URI Online Judge Solution 2604 Under 10 or Greater Than 100 Using PostgreSQL Query Language.
The financial sector of the company needs a report that shows the ID and the name of the products whose price is less than 10 or greater than 100.
Schema
| Column | Type |
| id (PK) | numeric |
| name | varchar |
| amount | numeric |
| price | numeric |
Tables
| id | name | amount | price |
| 1 | Two-door wardrobe | 100 | 80 |
| 2 | Dining table | 1000 | 560 |
| 3 | Towel holder | 10000 | 5.50 |
| 4 | Computer desk | 350 | 100 |
| 5 | Chair | 3000 | 210.64 |
| 6 | Single bed | 750 | 99 |
Output Sample
| id | name |
| 2 | Dining table |
| 3 | Towel holder |
| 5 | Chair |
URI 2604 Solution in SQL
SELECT Id, Name
FROM Products
WHERE Price<10
OR Price > <10 or="" price="">100
10>


Comments
Post a Comment