Based on table below, using oracle: used subqueries,display the supplier that supplied the most computers. CREATE TABLE supplier (SuppID NUMBER(3), SName VARCHAR2(15), SAddress VARCHAR2(20), SPhone VARCHAR2(12), CONSTRAINT supplier_suppID_PK PRIMARY KEY (suppID)); CREATE TABLE location (LocID NUMBER(3), Bldg_code CHAR(4), RoomNo NUMBER(3), CONSTRAINT location_locid_PK PRIMARY KEY (LocID)); CREATE TABLE computer (CompID NUMBER(5), SNumber VARCHAR2(15), Make VARCHAR2(20), SuppID NUMBER(3), LocID NUMBER(3), Value NUMBER(6,2), Date_purchased DATE, CONSTRAINT computer_compID_PK PRIMARY KEY (compID), CONSTRAINT computer_suppID_FK FOREIGN KEY (suppID) REFERENCES supplier, CONSTRAINT computer_locID_FK FOREIGN KEY (locID) REFERENCES location); INSERT INTO supplier VALUES (122, 'Compaq Sdn.Bhd', '10 Jalan Duta', '03-989898'); INSERT INTO supplier VALUES (123, 'ASUS Sdn.Bhd', '12 Jalan Duta', '03-232323'); INSERT INTO supplier VALUES (124, 'IBM Sdn.Bhd', '15 Jalan Duta', '03-565656'); INSERT INTO supplier VALUES (125, 'Apple Sdn.Bhd', '18 Jalan Duta', '03-785676'); INSERT INTO location VALUES (222, 'LAW', 343); INSERT INTO location VALUES (333, 'IRK', 343); INSERT INTO location VALUES (444, 'ICT', 343); INSERT INTO computer VALUES (13321, 'XDX12345', 'Compaq', 122, 222, 2300.50, TO_DATE('12-JAN-2008', 'DD-MON-YYYY')); INSERT INTO computer VALUES (13322, 'XDX12344', 'ASUS PC', 123, 222, 3000.80, TO_DATE('17-JAN-2008', 'DD-MON-YYYY')); INSERT INTO computer VALUES (13323, 'XDX12343', 'IBM', 124, 333, 2800.50, TO_DATE('12-DEC-2008', 'DD-MON-YYYY')); INSERT INTO computer VALUES (13324, 'XDX12342', 'Apple', 125, 444, 5300.50, TO_DATE('12-JUN-2009', 'DD-MON-YYYY')); INSERT INTO computer VALUES (13325, 'XDX12341', 'Apple', 125, 444, 6300.50, TO_DATE('12-JUN-2009', 'DD-MON-YYYY')); INSERT INTO computer VALUES (13326, 'XDX12346', 'Apple', 125, 444, 6000.85, TO_DATE('12-JUN-2009', 'DD-MON-YYYY')); COMMIT;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Based on table below, using oracle:

used subqueries,display the supplier that supplied the most computers.

CREATE TABLE supplier
(SuppID NUMBER(3),
SName VARCHAR2(15),
SAddress VARCHAR2(20),
SPhone VARCHAR2(12),
CONSTRAINT supplier_suppID_PK PRIMARY KEY (suppID));

CREATE TABLE location
(LocID NUMBER(3),
Bldg_code CHAR(4),
RoomNo NUMBER(3),
CONSTRAINT location_locid_PK PRIMARY KEY (LocID));

CREATE TABLE computer
(CompID NUMBER(5),
SNumber VARCHAR2(15),
Make VARCHAR2(20),
SuppID NUMBER(3),
LocID NUMBER(3),
Value NUMBER(6,2),
Date_purchased DATE,
CONSTRAINT computer_compID_PK PRIMARY KEY (compID),
CONSTRAINT computer_suppID_FK FOREIGN KEY (suppID) REFERENCES supplier,
CONSTRAINT computer_locID_FK FOREIGN KEY (locID) REFERENCES location);

INSERT INTO supplier VALUES (122, 'Compaq Sdn.Bhd', '10 Jalan Duta', '03-989898');
INSERT INTO supplier VALUES (123, 'ASUS Sdn.Bhd', '12 Jalan Duta', '03-232323');
INSERT INTO supplier VALUES (124, 'IBM Sdn.Bhd', '15 Jalan Duta', '03-565656');
INSERT INTO supplier VALUES (125, 'Apple Sdn.Bhd', '18 Jalan Duta', '03-785676');

INSERT INTO location VALUES (222, 'LAW', 343);
INSERT INTO location VALUES (333, 'IRK', 343);
INSERT INTO location VALUES (444, 'ICT', 343);

INSERT INTO computer VALUES (13321, 'XDX12345', 'Compaq', 122, 222, 2300.50, TO_DATE('12-JAN-2008', 'DD-MON-YYYY'));
INSERT INTO computer VALUES (13322, 'XDX12344', 'ASUS PC', 123, 222, 3000.80, TO_DATE('17-JAN-2008', 'DD-MON-YYYY'));
INSERT INTO computer VALUES (13323, 'XDX12343', 'IBM', 124, 333, 2800.50, TO_DATE('12-DEC-2008', 'DD-MON-YYYY'));
INSERT INTO computer VALUES (13324, 'XDX12342', 'Apple', 125, 444, 5300.50, TO_DATE('12-JUN-2009', 'DD-MON-YYYY'));
INSERT INTO computer VALUES (13325, 'XDX12341', 'Apple', 125, 444, 6300.50, TO_DATE('12-JUN-2009', 'DD-MON-YYYY'));
INSERT INTO computer VALUES (13326, 'XDX12346', 'Apple', 125, 444, 6000.85, TO_DATE('12-JUN-2009', 'DD-MON-YYYY'));

COMMIT;

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education