This is a more complete example showing how you can build queries to provide interesting data visualizations.