3 Comments

    select first(column_name) from table_name;
    select last(column_name) from table_name;
    select max(column_name) from table_name;
    select min(column_name) from table_name;
    select sum(column_name) from table_name;

    AVG – function returns the average value of a numeric column
    select avg(price) as priceaverage from products;

    COUNT – function returns the number of rows that matches a specified criteria
    select count(*) as numberoforders from orders;

    FIRST – function returns the first value of the selected column
    select first(customername) as firstcustomer from customers;

    LAST – function returns the last value of the selected column
    Select last(customername) as lastcustomer from customers;

    MAX – function returns the largest value of the selected column
    select max(price) as highestprice from products;

    1-MIN() function returns the smallest value of the selected column
    Example:SELECT * FROM Products where Price>(select MIN(Price)from Products);
    ANS:Number of Records: 76
    select MIN(price) from products;
    ANS:2.5

    2-MAX() function returns the largest value of the selected column.
    select max(price) from products;
    ANS:263.5
    3-COUNT() function returns the number of rows that matches a specified criteria.
    EXAMPLE:
    SELECT COUNT (*)FROM Products
    ANS:77
    4-AVG() function returns the average value of a numeric column.
    select AVG(price) from products;
    ANS:28.866363636363637

    5-The SUM() function returns the total sum of a numeric column.
    SELECT SUM(Price) FROM Products
    ANS:
    2222.71

Leave a Reply

Loading Questions

If you are facing any issue like can not see video so please login into Google with email what you forwarded to us Google Login or mail to administrator qatraining@infotek-solutions.com