Tweet number 28,270
-
A little "Fun with Handycapper" thread... prior to the release of Handycapper my query skills were minimal at best, and it had been several years since I used them. Over the last week I've been googling & poking around trying to improve. It was a week of this...
-
I started with the most basic, "hey, show me everything for this one thing". The query below basically selects a column (data element) from a table (the way the data elements are grouped together in the database) and lists everything. w3schools.com/sql/sql_select.asp
-
The above example lists the course for every row, in this case a row = a race. The other values for course are Turf and Inner Turf (in my data). Selecting a column like this can be a quick way to see what values are used, so then you can start querying for specific examples
-
Now we're gonna look at a couple of columns that have specific conditions: Handycapper, show me the number of starters for every 7F race on the turf at Belmont! (I only have current BEL meet in there or I'd need to include track in the where clause) w3schools.com/sql/sql_where.asp
-
Feeling confident, I moved on to vanilla counts: Handycapper, how many races have been run on the Inner at Belmont so far? w3schools.com/sql/sql_count_avg_sum.asp Another note, you can use "as" ("as Course" below) to rename the columns, this column would be named 'count(course)' otherwise
-
Finally I moved on to more complexity where I wanted to see the average field size per distance/course. This took awhile, and even after I got it to work, then I had to bang my head some more to get two decimal points. So much of this...
-
Then click the connect button in the SQL console, no password needed. Poke around and have some fun! The best way to thank @robinhowlett for his hard work is to use Handycapper and see what you can come up with #releasethedata
-







