Question: Hi i want to achieve this in sql; The most active seller (the one who has offered the most number of items) The most active

Hi i want to achieve this in sql;

The most active seller (the one who has offered the most number of items)

The most active buyer (the one who has bought the most number of items)

The most popular seller (the one who sold the most number of items)

Here is my seller , item, and buyer tables

create table item ( itemID char(5) NOT NULL, itemName varchar(15) NOT NULL, Item_desc varchar(255), Item_initialPrice decimal(8,2), ItemQty int, ownerName varchar(20), PRIMARY KEY (itemID));

create table seller ( sellerID INT IDENTITY(1000,1) NOT NULL, sellerName varchar(20), sellerUserName varchar(20), sellerPassword varchar(32),

item_ID char(5) NOT NULL, contact_ID int NOT NULL,

primary key(sellerID), Foreign Key(item_ID) references item(itemID), Foreign Key(contact_ID) references contactInfo(contactID));

create table buyer ( buyerID INT IDENTITY(1000,1) NOT NULL, buyerName varchar(20), buyerUsername varchar(20), buyerPassowrd varchar(32),

contact_ID int,

primary key(buyerID), Foreign Key(contact_ID) references contactInfo(contactID));

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!