On this page you can add additional search conditions using
WHERE clause. To do this select a field in the first column and
type search criteria in the Filter and OR... text boxes on the right. Search
criterion should be added as <operator><value>. E.g.
='USA' or =2009 or <>'red' or >10.
Also you can define sort fields to sort the records in the
chart. To do this select a field in the first column and choose
sort type and sort order.
In addition, you can add group fields to group the results by
one or more columns and apply aggregate functions like MIN, MAX,
SUM, AVERAGE and COUNT. To do this select a field in the first
column, check off the Group
By checkbox and choose one of values in the dropdown list
box under this checkbox. You can filter the records that a GROUP BY
clause returns using HAVING clause. To do this select a field in
the first column, select one of the aggregate functions and type
the condition as <operator><value> in the
textbox under Having. E.g.
>10 or = 500.
Example. Number of cars per
Let's build a chart showing the number of cars built after 2000
year per category. We need to use WHERE clause to select cars that
were built after 2000 year, GROUP BY clause to group records by
category and COUNT function to calculate the number of cars in each
Use SQL Query button to
view resulting SQL query and query results.