Format Font Tools Table Window Help SQL Assignment updated.docx 116% nt Elements
ID: 3698551 • Letter: F
Question
Format Font Tools Table Window Help SQL Assignment updated.docx 116% nt Elements Tables Charts SmartArt Review Paragraph Sty'es Normal No Spacing Heading1 Heading2Heading 3 Turning your work in: 1. Upload this completed document to BlackBoard> Assignments> SOL Assignment. Instructions: In this task. Available bere: http://www.w3schools.com/sql/trysalasp?filename trysql select all use w Copy and paste your SQL code into the space provided (please do not handwrite the code). Identify the number of records returned in your query results Use commonly accepted formating standards that we discussed in class (such as line breaks, keywords with all letters capitated, and capitalization that matches the fielditable names). End every statement with a semicolon; Points will be deducted for not following formatting standards. . An example of what I'm looking for is given below Example Task: Select all records and fields from the Categories table. SQL Code: Number of Records: SELECT FROM Categories; As discussed in the class, there are a couple of differences between SOL in Access and SQL in the w3schools.com Online SQL Editor 1. Statements generally run in the W3schools Online Editor even if you forget to end the statement with a semicolon. However, a statement with a missing semicolon would not run in Access SQL (or any other program tht uses SOL). I will check for (presence of) semicolons when I grade your work! 2. Wildcards are slightly different but do the same thing: Use % in the online system rather than Access's . Use in the online system rather than Access's % . PagesExplanation / Answer
Below is the query:
SELECT s.SupplierID,s.SupplierName,COUNT(*) No_of_products
FROM Products p
INNER JOIN Suppliers s
ON p.SupplierID=s.SupplierID
WHERE p.ProductName NOT IN ('Chartreuse verte')
GROUP BY s.SupplierID,s.SupplierName
HAVING COUNT(*) =1;
Explanation:
We have used select to get the supplier details and number of products sold using inner join between products and supliers table. We have used where clause to eliminate the product Chartreuse verte and having condition to keep records of supplier who sold 1 product.
OUTPUT:
Number of Records: 4
SupplierID SupplierName No_of_products 10 Refrescos Americanas LTDA 1 13 Nord-Ost-Fisch Handelsgesellschaft mbH 1 18 Aux joyeux ecclésiastiques 1 27 Escargots Nouveaux 1Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.