This is a database programming example in Oracle's version of SQL, T-SQL. Using the WHERE keyword and HAVING keyword as a correct example of using aggregate data and searching. Also sub-SELECT statements are demonstrated here.
This is an example of CRUD operations on SQL "views".