हिंदी

If column “Fees” contains the data set (5000,8000,7500,5000,8000), what will be the output after the execution of the given query? SELECT SUM (DISTINCT Fees) FROM student; - Informatics Practices

Advertisements
Advertisements

प्रश्न

If column “Fees” contains the data set (5000,8000,7500,5000,8000), what will be the output after the execution of the given query?

SELECT SUM (DISTINCT Fees) FROM student;

विकल्प

  • 20500

  • 10000

  • 20000

  • 33500

MCQ

उत्तर

20500

shaalaa.com
Functions in SQL
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2022-2023 (March) Sample

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

The MAX () function finds the


What will be the output of the following SQL statement? 

SELECT DAY NAME (2022-04-08) 


Which of the following is not an aggregate function?


The char() function in MySql is an example of ______. 


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 day of year('2015-02-10') = ______.


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


What will be returned by the given query? select power(3, 2) = ______.


What will be returned by the given query? Select length(trim("ABC Public School")) = ______.


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


Name a function of MySQL which is used to remove trailing and leading spaces from a string.


The ______ function returns m raised to the nth power.


Name a function of MySQL used to give position of the first occurrence of a string2 in string1.


What will be returned by the given query? SELECT DAYOFYEAR('2015-01-10') = ______.


Which of the following is not a date function?


Which function will be used to remove only the trailing spaces from a string?


What is the general format of UPPER() return type?


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

To display the specified number of characters from a particular position of the given string.


Write the output produced by the following SQL statement:

SELECT LENGTH("Informatics Practices");


Write the output produced by the following SQL statement:

SELECT    YEAR(“1979/11/26”),
MONTH(“1979/11/26”),    DAY(“1979/11/26”), MONTHNAME(“1979/11/26”);


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


Predict the output of the code given below:

s="welcome2cs" 

n = len(s)
m=""
for i in range(0, n):
       if (s[i] >= 'a' and s[i] <= 'm'):
            m = m +s[i].upper()
 elif (s[i] >= 'n' and s[i] <= 'z'):
          m = m +s[i-1]
 elif (s[i].isupper()):
     m = m + s[i].lower()
 else:
     m = m +'&'
print(m)

Which one of the following is not an aggregate function?


Write suitable SQL query for the following:

Display the remainder of 100 divided by 9.


Explain the following SQL function using a suitable example.

TRIM()


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.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×