Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago

Question

=+Describe an important trade-off you recently faced

Answered: 1 week ago