diff --git a/Practical/Practical Exam/SQL/S9 - SQL Queries.md b/Practical/Practical Exam/SQL/S9 - SQL Queries.md index 04aa043..bd94de9 100644 --- a/Practical/Practical Exam/SQL/S9 - SQL Queries.md +++ b/Practical/Practical Exam/SQL/S9 - SQL Queries.md @@ -127,7 +127,7 @@ SELECT Iname, Pquantity FROM Purchase INNER JOIN Customers ON Purchase.Cno = Cus 7. Create view which shows Iname, Price and Count of all stationary items in descending order of price. ```sql -CREATE VIEW itemView AS SELECT Iname, Iprice, COUNT(*) FROM Items GROUP BY Iname, Iprice ORDER BY Iprice DESC; +CREATE VIEW itemView AS SELECT Iname, Iprice, Icount FROM Items ORDER BY Iprice DESC; SELECT * FROM itemView; ```