Answered You can hire a professional tutor to get the answer.

QUESTION

Using SQL SERVER Find any owners that own more than one property.You MUST use a subquery.Display the owner number, last name and first name and sort...

Using SQL SERVER

Find any owners that own more than one property. You MUST use a subquery. Display the owner number, last name and first name and sort on the owner number. (Note: There are 2 duplicate owner names.)

CREATE DATABASE JimsCondos;

GO

USE JimsCondos;

CREATE TABLE Locations(

LocNum INT NOT NULL PRIMARY KEY IDENTITY,

LocName VARCHAR(25) NOT NULL,

StreetAddress VARCHAR(25) NOT NULL,

City VARCHAR(25) NOT NULL,

LocState VARCHAR

(2) NOT NULL CONSTRAINT DF_Locations_LocState DEFAULT 'FL',

PostalCode VARCHAR(5) NOT NULL

);

CREATE TABLE Owners(

OwnerNum VARCHAR(5) NOT NULL PRIMARY KEY,

LastName VARCHAR(25) NOT NULL,

FirstName VARCHAR(25) NOT NULL,

StreetAddress VARCHAR(35) NOT NULL,

City VARCHAR(15) NOT NULL,

OwnerState VARCHAR(2) NOT NULL,

PostalCode VARCHAR(5) NOT NULL

);

-- Data for Location Table --

--INSERT Locations (LocNum, LocName, StreetAddress, City, LocState, PostalCode) VALUES

INSERT INTO Locations (LocName, StreetAddress, City, LocState, PostalCode) VALUES

('Johnson Ocean', '100 Ocean Ave.', 'Bowton', 'FL', '31313'),

('Johnson Bayside', '405 Bayside Blvd.',

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question