w3resource
SQL exercises

SQL: Display all information with specified conditions

SQL Boolean Operators : Exercise-1 with Solution.

Write a query to display all customers with a grade above 100.

Sample table: customer


Sample Solution :

SELECT * 
FROM customer 
WHERE grade > 100;

Output of the Query:

customer_id	cust_name	city		grade	salesman_id
3007		Brad Davis	New York	200		5001
3005		Graham Zusi	California	200		5002
3008		Julian Green	London		300		5002
3004		Fabian Johnson	Paris		300		5006
3003		Jozy Altidor	Moscow		200		5007

Explanation :

Syntax of display all customer with grade

Pictorial presentation :

Result of display all customer with grade

Query Visualization:

Duration:

Query visualization of Display all information with specified conditions - Duration

Rows:

Query visualization of Display all information with specified conditions - Rows

Cost:

Query visualization of Display all information with specified conditions - Cost

 

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: SQL Boolean and Relational Operators Exercises Home
Next: Write a query statement to display all customers in New York who have a grade value above 100.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming