Class - 12 CBSE Computer Science Important Output Questions 2025
Give output for following SQL queries as per given table(s) :
Table : PRODUCT
P_ID | ProductName | Manufacturer | Price |
---|---|---|---|
TPO1 | Talcom Powder | LAK | 40 |
FW05 | Face Wash | ABC | 45 |
BS01 | Bath Soap | ABC | 55 |
SHO6 | Shampoo | XYZ | 120 |
FW12 | Face Wash | XYZ | 95 |
Table : CLIENT
C_ID | ClientName | City | P_ID |
---|---|---|---|
01 | Cosmetic Shop | Delhi | FW05 |
06 | Total Health | Mumbai | BS01 |
12 | Live Life | Delhi | SHO6 |
15 | Pretty Woman | Delhi | FW12 |
16 | Dreams | Bangalore | TP01 |
(i) SELECT DISTINCT City FROM Client ;
(ii) SELECT Manufacturer, MAX(Price), Min(Price), Count(*)
FROM Product GROUP BY Manufacturer ;
(iii) SELECT ClientName, ProductName
FROM Product, Client
WHERE Client.P_Id = Product.P_Id ;
(iv) SELECT ProductName, Price * 4 FROM Product ;
SQL Queries
1 Like
Answer
(i)
Output
+-----------+
| City |
+-----------+
| Delhi |
| Mumbai |
| Bangalore |
+-----------+
(ii)
Output
+--------------+------------+------------+----------+
| Manufacturer | MAX(Price) | Min(Price) | Count(*) |
+--------------+------------+------------+----------+
| ABC | 55 | 45 | 2 |
| XYZ | 120 | 95 | 2 |
| LAK | 40 | 40 | 1 |
+--------------+------------+------------+----------+
(iii)
Output
+---------------+---------------+
| ClientName | ProductName |
+---------------+---------------+
| Cosmetic Shop | Face Wash |
| Total Health | Bath Soap |
| Live Life | Shampoo |
| Pretty Woman | Face Wash |
| Dreams | Talcum Powder |
+---------------+---------------+
(iv)
Output
+---------------+-----------+
| ProductName | Price * 4 |
+---------------+-----------+
| Bath Soap | 220 |
| Face Wash | 180 |
| Face Wash | 380 |
| Shampoo | 480 |
| Talcum Powder | 160 |
+---------------+-----------+
Answered By
2 Likes