sql all

Solutions on MaxInterview for sql all by the best coders in the world

showing results for - "sql all"
06 Jan 2021
1Returns true if any of the subquery values meet the given condition.
2Example: Returns products from the products table which have received
3orders – stored in the orders tablewith a quantity of more than 5.
4SELECT name
5FROM products
6WHERE productId = ANY (SELECT productId FROM orders WHERE
7quantity > 5);
05 Oct 2019
1Returns true if all of the subquery values meet the passed condition.
2Example: Returns the users with a higher number of tasks than the user
3with the highest number of tasks in the HR department (id 2)
4SELECT first_name, surname, tasks_no
5FROM users
6WHERE tasks_no > ALL (SELECT tasks FROM user WHERE
7department_id = 2);