Search Header Logo

SQL Queries Basics

Authored by V Analysts

Other, Other

Professional Development

Used 12+ times

SQL Queries Basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

I have a table named Jobs which contains the data of different jobs on a JobPortal. How do I find the number of rows in the table?

Select count(*) from jobs;

make count(*) from jobs;

insert count(*) from jobs;

delete count(*) from jobs;

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

If we wanted to know the names of all distinct companies in the Job table alphabetically - which of the following queries will do the Job?

Select distinct company from jobs order by company

select distinct company from jobs order by 1

select distinct company from jobs order by company desc

order by company select distinct company from jobs

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The function to get the total of a column in MySQL is?

SUM

ADD

Total

None of the above

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In our Jobs table, what will be the query if I want to get the total ctc given in all the jobs and put it in a variable named total_ctc in the final results?

Select total(ctc) from jobs;

select sum(ctc) as total_ctc from jobs

select total(ctc) as total_ctc from jobs

Both b & c

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Let’s say in the previous example, I want to know the highest and lowest value of ctc in the table. What will the query look like?

Select low(ctc) as lowest_salary,high(ctc) as highest salary from jobs

Select min(ctc) as lowest_salary,max(ctc) as highest salary from jobs

Select lowest(ctc) as lowest_salary,highest(ctc) as highest salary from jobs

None of the above

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Suppose in the table Assignment as we had used in the videos of this module, I want to know the total salary of Pooja Mishra and Sneha. Which of these queries will work fine?

select sum(salary) from assignment where name='Pooja Mishra' and name = 'Sneha'

select sum(salary) from assignment where name='Pooja Mishra' or name = 'Sneha'

select sum(salary) from assignment where name in 'Pooja Mishra' ,'Sneha')

select tot(salary) from assignment where name in 'Pooja Mishra' ,'Sneha')

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The options IN, OR, NOT, AND, BETWEEN are applied to

Group by clause

Where clause

Get

Nest

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?