English

Abhishek has created a table, named STOCK, with a set of records to maintain the data of packaged milk in his shop. After creating the table, he entered the data and the table looked as follows: - Computer Science (Python)

Advertisements
Advertisements

Question

Abhishek has created a table, named STOCK, with a set of records to maintain the data of packaged milk in his shop. After creating the table, he entered the data and the table looked as follows:

Code Type Volume Qty Price
AF0.5 F 0.5 300 38.00
MFO.5 F 0.5 250 36.50
MT1.О T 1.0 150 64.00
AT1.0 T 1.0 100 66.00
PD1.0 D 1.0 50 52.00
PT0.5 T 0.5 78 30.00
Considering the table STOCK as given above, write the output on execution of the following queries :
  1. SELECT Volume, Qty, Price FROM STOCK
            WHERE Type IN ('F', 'D');
  2. SELECT Code, Qty FROM STOCK
            WHERE Price BETWEEN 30 AND 50;
  3. SELECT DISTINCT Type FROM STOCK;
  4. SELECT Volume, count(*) FROM STOCK GROUP BY Volume;
Very Short Answer
Advertisements

Solution

  1. Volume Qty Price
    0.5 300 38.00
    0.5 250 36.50
    1.0 50 52.00
  2. Code Qty
    AFO.5 300
    MFO.5 250
    PTO.5 78
  3. Type
    F
    T
    D
  4. Volume count(*)
    0.5 3
    1.0 3
shaalaa.com
  Is there an error in this question or solution?
2025-2026 (March) Set 4

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×