Saturday 15 January 2011

having command in sql -



having command in sql -

when write sql command:

select year, count(book_id) books pages > 200 grouping year having avg(pages) > 400

the "having avg(pages) > 400" - calculate pages average of books in year, or books pages more 200?

where clause filters rows , gives books pages >200 , having clause applied these books.

sql

No comments:

Post a Comment