Consider the following relations MobileMaster & MobileStock:- MobileMaster M_Id M_Company M_Name M_Price M_Mf_Date MB001 Samsung Galaxy 4500 2013-02-12 MB003 Nokia N1100 2250 2011-04-15 MB004 Micromax Unite3 4500 2016-10-17 MB005 Sony ХрeriaM 7500 2017-11-20 MB006 Орpo SelfieEx 8500 2010-08-21

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Consider the following relations MobileMaster & MobileStock:-
MobileMaster
M_Id
M_Company
M_Name
M_Price
M_Mf_Date
MB001
Samsung
Galaxy
4500
2013-02-12
MB003
Nokia
N1100
2250
2011-04-15
MB004
Micromax
Unite3
4500
2016-10-17
MB005
Sony
ХperiaM
7500
2017-11-20
MB006
Oppo
SelfieEx
8500
2010-08-21
MobileStock
S_Id
M_Id
M_Qty
M_Supplier
S001
MB004
450
New Vision
S002
MB003
250
Praveen Gallery
S003
MB001
300
Classic Mobile Store
S004
MB006
150
A-one Mobiles
S005
MB003
150
The Mobile
S006
MB006
50
Mobile Centre
Write the SQL query for questions from (i) to (iv) & write the output of SQL command
for questions from (v) to (viii) given below:-
(i)
Display the Mobile company, Mobile name & price in descending order of
their manufacturing date.
(ii)
List the details of mobile whose name starts with 'S'.
(iii)
Display the Mobile supplier & quantity of all mobiles except 'MB003’.
(iv)
To display the name of mobile company having price between 3000 & 5000.
(v)
SELECT M_Id, SUM(M_Qty) FROM MobileStock GROUP BY M_Id;
(vi)
SELECT MAX(M_Mf_Date), MIN(M_Mf_Date) FROM MobileMaster;
(vii)
SELECT M1.M_Id, M1.M_Name, M2.M_Qty, M2.M_Supplier FROM
MobileMaster M1, MobileStock M2 WHERE M1.M_Id=M2.M_Id AND
M2.M_Qty>=300;
Transcribed Image Text:Consider the following relations MobileMaster & MobileStock:- MobileMaster M_Id M_Company M_Name M_Price M_Mf_Date MB001 Samsung Galaxy 4500 2013-02-12 MB003 Nokia N1100 2250 2011-04-15 MB004 Micromax Unite3 4500 2016-10-17 MB005 Sony ХperiaM 7500 2017-11-20 MB006 Oppo SelfieEx 8500 2010-08-21 MobileStock S_Id M_Id M_Qty M_Supplier S001 MB004 450 New Vision S002 MB003 250 Praveen Gallery S003 MB001 300 Classic Mobile Store S004 MB006 150 A-one Mobiles S005 MB003 150 The Mobile S006 MB006 50 Mobile Centre Write the SQL query for questions from (i) to (iv) & write the output of SQL command for questions from (v) to (viii) given below:- (i) Display the Mobile company, Mobile name & price in descending order of their manufacturing date. (ii) List the details of mobile whose name starts with 'S'. (iii) Display the Mobile supplier & quantity of all mobiles except 'MB003’. (iv) To display the name of mobile company having price between 3000 & 5000. (v) SELECT M_Id, SUM(M_Qty) FROM MobileStock GROUP BY M_Id; (vi) SELECT MAX(M_Mf_Date), MIN(M_Mf_Date) FROM MobileMaster; (vii) SELECT M1.M_Id, M1.M_Name, M2.M_Qty, M2.M_Supplier FROM MobileMaster M1, MobileStock M2 WHERE M1.M_Id=M2.M_Id AND M2.M_Qty>=300;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY