Skip to main content
100%

Fun SQL statements for CartoDB

✓ Published0🌍 Public
Aandrewxhill
Last edited Dec 8, 2013
Created on Dec 8, 2013

This example shows how to explore and analyze tornado and county data in CartoDB using SQL statements. It demonstrates basic queries for filtering, sorting, and aggregating records, followed by spatial functions that inspect geometry types, compute areas, distances, and intersections. The code uses PostGIS functions such as `ST_Area`, `ST_Distance`, `ST_Intersects`, and `ST_DWithin`, alongside CartoDB-specific helpers like `CDB_LatLng`. It also includes updates to add tornado counts and density per county, highlighting how SQL can drive interactive map visualizations.

AI-generated description

Similar vizzes