Fixed query 7, didn't realize count was already there, wayyyyyyyyyy too sleeeppyyyyyy to see that 😫

This commit is contained in:
K 2024-11-10 00:56:55 +05:30
parent 02e284ad48
commit 3175ea83b5
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

View File

@ -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;
```