Search Header Logo

Postgree SQL Day-1

Authored by swaas 3

Other

Professional Development

Used 2+ times

Postgree SQL Day-1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Which SQL statement is used to select all records from a table named 'CUSTOMERS'?(ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NOT IN SMALL LETTERS)

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Filter records using WHERE

Retrieves EMPLOYEES who work in the IT DEPARMENT?(ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NOT IN SMALL LETTERS)

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Use LIKE for pattern matching

Finds CUSTOMERS whose CUSTOMERNAME start with "A".(ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NOT IN SMALL LETTERS)

4.

FILL IN THE BLANK QUESTION

2 mins • 1 pt

Lists PRODUCTS ordered by PRICE in descending order.(ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NOT IN SMALL LETTERS and SPACE)

5.

FILL IN THE BLANK QUESTION

2 mins • 1 pt

Aggregate function with GROUP BY

Write a SQL query to COUNT THE NUMBER OF EMPLOYEES IN EACH DEPARTMENT and name the count column as TOTALEMPLOYEES (THE ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NO SMALL LETTERS).

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Delete a record

Deletes the PRODUCTNAME "PEPSI" from the PRODUCTS table.(ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NOT IN SMALL LETTERS)

7.

FILL IN THE BLANK QUESTION

2 mins • 1 pt

Write a query to retrieve employee names and their department names.(ANSWER MUST BE WRITTEN IN CAPITAL LETTERS ONLY, NOT IN SMALL LETTERS)

Tables:

  • EMPLOYEES E(EMPLOYEEID, NAME, DEPARTMENTID)

    • DEPARTMENTS D(DEPARTMENTID, DEPARTMENTNAME)

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?