हिंदी

Shreya, a database administrator has designed a database for a clothing shop. Help her by writing answers to the following questions based on the given table: - Informatics Practices

Advertisements
Advertisements

प्रश्न

Shreya, a database administrator has designed a database for a clothing shop. Help her by writing answers to the following questions based on the given table:

TABLE: CLOTH
CCODE CNAME SIZE COLOR PRICE DOP
C001 JEANS XL BLUE 990 2022-01-21
C002 T-SHIRT M RED 599 2021-12-12
C003 TROUSER M GREY 399 2021-11-10
C004 SAREE FREE GREEN 1299 2019-11-12
C005 KURTI L WHITE 399 2021-12-07
  1. Write a query to display cloth names in lowercase.
  2. Write a query to display the lowest price of the clothes.
  3. Write a query to count the total number of clothes purchased in medium size.
    OR
    Write a query to count the year-wise total number of clothes purchased.
टिप्पणी लिखिए
Advertisements

उत्तर

  1. SELECT LOWER(CNAME) FROM CLOTH;
  2. SELECT MIN(PRICE) FROM CLOTH;
  3. SELECT COUNT(*) FROM CLOTH GROUP BY SIZE HAVING SIZE = 'M';
    OR
    SELECT YEAR(DOP),COUNT(*) FROM CLOTH GROUP BY YEAR(DOP);
shaalaa.com
Functions in SQL
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2022-2023 (March) Sample

संबंधित प्रश्न

______ keyword is used to find out the number of values in a column?


Which method is used to get the row-id of the last modified row?


Which of the following belongs to an "aggregate function"?


Assertion (A): COUNf function ignores DISTINCT

Reason (R): DISTINCT ignores the duplicate values.


Which command is used to delete a table? (in SQL)


What will be returned by the given query? select mid("Computer", 2, 4) = ______.


What will be returned by the given query? SELECT RIGHT("LEFT", 2) = ______.


What will be returned by the given query? SELECT MID('LeaminglsFun', 2, 4) = ______.


The ______ function returns m raised to the nth power.


What will be returned by the given query? SELECT MID('BoardExamination', 2, 4) = ______.


Which of the following is not a date function?


Site any two differences between Single Row Functions and Aggregate Functions.


Write the name of the functions to perform the following operation:

To display the day like “Monday”, and “Tuesday”, from the date when India got independence.


Write the name of the functions to perform the following operation:

To display the name of the month in which you were born.


Write the output produced by the following SQL statement:

SELECT ROUND(342.9234, -1);


Which function is used to display the total number of records from a table in a database?


Differentiate between count() and count(*) functions in SQL with appropriate examples.


Which one of the following is not an aggregate function?


Write suitable SQL query for the following:

Display 7 characters extracted from the 7th left character onwards from the string ‘INDIA SHINING’.


Write suitable SQL query for the following:

Display the position of occurrence of the string ‘COME’ in the string ‘WELCOME WORLD’.


Write suitable SQL query for the following:

Round off the value 23.78 to one decimal place.


Explain the following SQL function using a suitable example.

UCASE()


Explain the following SQL function using a suitable example.

DAYNAME()


Explain the following SQL function using a suitable example.

POWER()


Which function returns the sum of all elements of a list?


Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×