CBSE CS and IP

CBSE Class 11 & 12 Computer Science and Informatics Practices Python Materials, Video Lecture

Structured Query Language (3 Marks Questions)


  1. Shewani has recently started working in MySQL. Help her in understanding the difference between the following :
    • Where and having clause
    • Count(column_name) and count(*)
  2. On the basis of following table answer the given questions:
    Table: CUSTOMER_DETAILS
    +---------+-----------+-----------+-------------+------------+--------+
    | Cust_ID | Cust_Name | Acct_Type | Accumlt_Amt |        DOJ | Gender |
    +---------+-----------+-----------+-------------+------------+--------+
    | CNR_001 |     Manoj |    Saving |      101250 | 1992-02-19 |      M |
    | CNR_002 |     Rahul |   Current |      132250 | 1998-01-11 |      M |
    | CNR_004 |     Steve |    Saving |       18200 | 1998-02-21 |      M |
    | CNR_005 |  Manpreet |   Current |        NULL | 1994-02-19 |      M |
    +---------+-----------+-----------+-------------+------------+--------+
    • Write the degree and cardinality of the above table.
    • What will be the output of the following query :
      Select max(DOJ) From Customer_Details;
    • Write the sql query to delete the row from the table where customer has no accumulated amount.

No comments:

Post a Comment