Some basic sql based analysis.