Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 CREATE VIEW bigorders AS SELECT onum FROM orders_aj WHERE amount>= 4000;
- VIEW created
- 2 CREATE VIEW ratecount(rating,rating_count) AS SELECT rating,COUNT(cnum) FROM customer_aj GROUP BY rating;
- VIEW created
- -- how view looks
- RATING RATING_COUNT
- 300 2
- 200 2
- 100 3
- 3 CREATE VIEW demo (high_rating) AS SELECT MAX(rating) FROM customer_aj;
- VIEW created
- 4 CREATE VIEW demo_k (city,city_count) AS SELECT city,COUNT(snum) FROM salesman_aj GROUP BY city;
- VIEW created
- -- how view looks
- CITY CITY_COUNT
- Surat 1
- Baroda 1
- NEW Delhi 1
- London 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement