Which of the following best describes a relational database?
Which of the following is not a valid data type in a relational database?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What is the purpose of a primary key in a relational database table?
Which SQL keyword is used to retrieve data from a relational database table?
Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the names of employees with a salary greater than 50000?
Consider the following table "orders":
+----+------------+------------+
| id | order_date | total |
+----+------------+------------+
| 1 | 2022-05-01 | 100 |
| 2 | 2022-06-15 | 250 |
| 3 | 2022-07-03 | 75 |
+----+------------+------------+
Which SQL query will retrieve the total revenue earned in June 2022?
Consider the following table "products":
+----+---------+-------+
| id | name | price |
+----+---------+-------+
| 1 | Laptop | 1000 |
| 2 | Monitor | 300 |
| 3 | Mouse | 25 |
+----+---------+-------+
Which SQL query will retrieve the average price of all products?
Consider the following table "customers":
+----+----------+-----------+
| id | name | city |
+----+----------+-----------+
| 1 | John | New York |
| 2 | Alice | Chicago |
| 3 | Bob | New York |
+----+----------+-----------+
Which SQL query will retrieve the unique cities from which customers belong?
Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the highest salary from the employees table?
Consider the following table "orders":
+----+------------+------------+
| id | order_date | total |
+----+------------+------------+
| 1 | 2022-05-01 | 100 |
| 2 | 2022-06-15 | 250 |
| 3 | 2022-07-03 | 75 |
+----+------------+------------+
Which SQL query will retrieve the number of orders placed in each month?
Consider the following table "products":
+----+---------+-------+
| id | name | price |
+----+---------+-------+
| 1 | Laptop | 1000 |
| 2 | Monitor | 300 |
| 3 | Mouse | 25 |
+----+---------+-------+
Which SQL query will retrieve the products with a price greater than the average price?
Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the names of employees with a salary between 50000 and 60000?
Consider the following table "orders":
+----+------------+------------+
| id | order_date | total |
+----+------------+------------+
| 1 | 2022-05-01 | 100 |
| 2 | 2022-06-15 | 250 |
| 3 | 2022-07-03 | 75 |
+----+------------+------------+
Which SQL query will retrieve the orders with a total greater than the average total?
Consider the following table "employees":
+----+----------+-----------+
| id | name | salary |
+----+----------+-----------+
| 1 | John | 50000 |
| 2 | Alice | 60000 |
| 3 | Bob | 45000 |
+----+----------+-----------+
Which SQL query will retrieve the names of employees whose names contain the letter "o"?