Task#2.
From the Products table, select the names of all products whose price values are integers, in addition, they must be products that do not belong to the following categories (CategoryID): 1, 2, 3, 4, 5, 6.
You can try your query here
You can share your solution in comment once the task is solved.
#task
From the Products table, select the names of all products whose price values are integers, in addition, they must be products that do not belong to the following categories (CategoryID): 1, 2, 3, 4, 5, 6.
You can try your query here
You can share your solution in comment once the task is solved.
#task
Which one of the following SQL queries will delete the "customers" table and all its content from the database?
Anonymous Quiz
29%
DROP customers;
4%
DELETE customers;
19%
DELETE * FROM customers;
11%
DELETE * FROM <database> WHERE table="customers";
37%
DROP TABLE customers;
Select the only aggregation function from the list
Anonymous Quiz
4%
EXCEPT
7%
JOIN
3%
LIKE
83%
MIN
1%
EXISTS
0%
CASE
2%
IN
Which one of the following queries will limit selection by only 3 rows?
Anonymous Quiz
2%
SELECT * FROM Customers 3
77%
SELECT * FROM Customers LIMIT 3
5%
SELECT * FROM Customers 3 LIMIT
3%
SELECT 3 LIMITS * FROM Customers
14%
SELECT LIMIT(3) * FROM Customers
👍1
Interview question
You have table: Suppliers
Columns: SupplierName, Country
Question: Write one query, to select all the suppliers that are not from Brazil, Italy, Germany.
Feel free to put your solution in the comments.
You have table: Suppliers
Columns: SupplierName, Country
Question: Write one query, to select all the suppliers that are not from Brazil, Italy, Germany.
Feel free to put your solution in the comments.
Select the existing statement
Anonymous Quiz
49%
INSERT INTO SELECT
17%
INSERT INTO GROUP BY
21%
SELECT INTO INSERT
7%
UPDATE INTO INSERT
5%
SELECT INTO UPDATE
In SQL, which clause(s) of outer query may include a subquery?
Anonymous Quiz
8%
Only FROM clause
23%
WHERE and FROM clauses
8%
Only SELECT clause
60%
SELECT, FROM and WHERE clauses
Which type of JOIN doesn't exist in SQL neither as operator, nor as an approach or concept?
Anonymous Quiz
5%
Full Join
9%
Cross Join
2%
Right Join
58%
Struct Join
4%
Self Join
22%
Exclusive Join
Considering that salary is constant for 12 months,
choose the correct query to get the annual salary value per employee.
choose the correct query to get the annual salary value per employee.
Anonymous Quiz
35%
SELECT f_name, l_name, job_id, salary*12 AS Salary Per Year FROM employees;
46%
SELECT f_name, l_name, job_id, salary*12 AS "Salary Per Year" FROM employees;
6%
SELECT f_name, l_name, job_id, salary AS Salary Per Year*12 FROM employees;
12%
SELECT f_name, l_name, job_id, salary AS Salary Per Year FROM employees;
Which syntactic construction should be used to get records sorted in reverse alphabetical order?
Anonymous Quiz
18%
ORDER BY + ASC
2%
SORT BY + ASC
4%
GROUP BY + ASC
4%
AVG + DESC
60%
ORDER BY + DESC
12%
SORT BY + DESC
1%
GROUP BY + DESC
Let's say if there is a task to order records by one field or another depeinding on specified conditions, is it possible to implement the kind of logic within the query?
Anonymous Quiz
90%
Yes, it's possible.
10%
No, it's not possible.
🥰1
Which keyword can be used for shortening the JOIN syntactic construction?
Anonymous Quiz
8%
APPLY
7%
ADJUST
4%
ASSUME
49%
USING
3%
DOING
29%
MATCH
What is the name of the function that will increase the number of the primary key by one, each time when a new record will be inserted?
Anonymous Quiz
15%
Auto Update
66%
Auto Increment
2%
Auto Change
4%
Auto Check
13%
Auto Insert
In the database context what the BLOB abbreviation stands for?
Anonymous Quiz
7%
Bisectoral Linear Object
12%
Business Logic Object
51%
Binary Large Object
30%
Binary List of Objects
Which of the following queries can be used to select all the records in the Employees table that have a LastName field value alphabetically between (and including) Davolio and Watson?
Anonymous Quiz
77%
SELECT * FROM Employees WHERE LastName BETWEEN 'Davolio' AND 'Watson'
21%
SELECT * FROM Employees WHERE LastName > 'Davolio' AND LastName < 'Watson'
2%
SELECT LastName > 'Davolio' AND LastName < 'Watson' FROM Employees
👍3
Which one is the correct example of using the CONCAT function?
Anonymous Quiz
10%
SELECT CONCAT IN (Name, Surname) FROM Clients;
14%
SELECT CONCAT = (Name, " ", Surname) AS "Full Name" FROM Clients;
63%
SELECT CONCAT(Name, " ", Surname) AS "Full Name" FROM Clients;
13%
SELECT Name, Surname FROM Clients WHERE CONCAT = (SELECT Name, Surname FROM Clients);
👍1
For what purposes NATURAL JOIN can be used?
Anonymous Quiz
23%
To get all the unique columns from joined tables.
19%
To select only those columns that have the same names from tables to be joined.
16%
There is no such thing as NATURAL JOIN.
43%
NATURAL JOIN is 100% the same as INNER JOIN.
👍4
Task#3
Write a query that will display the FirstName of the employee who processed the most orders between 1996-09-02 and 1996-12-31.
Used tables: Orders, Employees.
You can use w3schools db for writing a query.
As soon as you're done with the task, feel free to share the name of the employee in the comment section to this task (but don't share the code itself, in order not to make a spoiler for others😉)
#task
Write a query that will display the FirstName of the employee who processed the most orders between 1996-09-02 and 1996-12-31.
Used tables: Orders, Employees.
You can use w3schools db for writing a query.
As soon as you're done with the task, feel free to share the name of the employee in the comment section to this task (but don't share the code itself, in order not to make a spoiler for others😉)
#task
Solution to Task#3
SELECT Employees.FirstName
FROM [Orders]
JOIN Employees USING(EmployeeID)
WHERE OrderDate BETWEEN "1996-09-02" AND "1996-12-31"
GROUP BY EmployeeID ORDER BY COUNT(*) DESC LIMIT 1
#task
SELECT Employees.FirstName
FROM [Orders]
JOIN Employees USING(EmployeeID)
WHERE OrderDate BETWEEN "1996-09-02" AND "1996-12-31"
GROUP BY EmployeeID ORDER BY COUNT(*) DESC LIMIT 1
#task
👏3