Question: A query of the table information for table Supplier returns the following information: cid name type notnull dflt_value pk 0 Id INTEGER 0 None 1

 A query of the table information for table Supplier returns the

A query of the table information for table Supplier returns the following information:

cid name type notnull dflt_value pk
0 Id INTEGER 0 None 1
1 CompanyName TEXT 1 None 0
2 ContactName TEXT 0 None 0
3 ContactTitle TEXT 0 None 0
4 City TEXT 0 None 0
5 Country TEXT 0 None 0
6 Phone TEXT 0 None 0
7 Fax TEXT 0 None 0

A query of the table information for table Customer returns the following information:

cid name type notnull dflt_value pk
0 Id INTEGER 0 None 1
1 FirstName TEXT 1 None 0
2 LastName TEXT 1 None 0
3 City TEXT 0 None 0
4 Country TEXT 0 None 0
5 Phone TEXT 0 None 0

A query of the table information for table Product returns the following information:

cid name type notnull dflt_value pk
0 Id INTEGER 0 None 1
1 ProductName TEXT 1 None 0
2 SupplierId INTEGER 1 None 0
3 UnitPrice REAL 1 0 0
4 Package TEXT 0 None 0
5 IsDiscontinued INTEGER 1 0 0

A query of the table information for table Order returns the following information:

cid name type notnull dflt_value pk
0 Id INTEGER 0 None 1
1 OrderDate TEXT 1 None 0
2 OrderNumber TEXT 0 None 0
3 CustomerId INTEGER 1 None 0
4 TotalAmount REAL 0 0 0

A query of the table information for table OrderItem returns the following information:

cid name type notnull dflt_value pk
0 Id INTEGER 0 None 1
1 OrderId INTEGER 1 None 0
2 ProductId INTEGER 1 None 0
3 UnitPrice REAL 1 0 0
4 Quantity INTEGER 1 1 0

Your Task

List the Country and the CompanyName for all our suppliers.

Sort your results in alphabetical order of the Country and CompanyName

Note: This question requires you to write SQL syntax ONLY. Absolutely no python code should be used. Only the SQL itself.

For example:

Result
Country CompanyName ---------- ----------- Australia G'day, Mate Australia Pavlova, Lt Brazil Refrescos A Canada Forts d'r Canada Ma Maison Denmark Lyngbysild Finland Karkki Oy France Aux joyeux France Escargots N France Gai pturag Germany Heli Swar Germany Nord-Ost-Fi Germany Plutzer Leb Italy Formaggi Fo Italy Pasta Butti Japan Mayumi's Japan Tokyo Trade Netherland Zaanse Snoe Norway Norske Meie Singapore Leka Tradin Spain Cooperativa Sweden PB Knckebr Sweden Svensk Sjf UK Exotic Liqu UK Specialty B USA Bigfoot Bre USA Grandma Kel USA New England USA New Orleans 

\begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ Product } \\ \hline PK & Id \\ FK & ProductName \\ & Supplierld \\ & UnitPrice \\ & Package \\ & IsDiscontinued \\ \hline \end{tabular} \begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{ Orderltem } \\ \hlinePK & ld \\ FK & Orderld \\ FK & Productld \\ & UnitPrice \\ & Quantity \\ \hline \end{tabular}

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!