arcus / education_modules

https://arcus.github.io/education_modules/
Creative Commons Attribution Share Alike 4.0 International
9 stars 8 forks source link

Data type in SQL macro templates #884

Closed drelliche closed 5 months ago

drelliche commented 7 months ago

Right now all of the data types in the alaSQL tables in the SQL macros used by the SQL modules and the Arcus Speaker Series are strings.

But in the SQL Intermediate module and webinar, we teach aggregate functions, some of which (SUM and AVG) cannot be usefully demoed using the tables that have only string data.

There are similarly issues with MAX, MIN, and COUNT when the "NA" values are the string "NA" rather than a null value.

This issue is urgent because we are giving the SQL Intermediate talk next week!

drelliche commented 7 months ago

Possibly useful links:

LiaScript alaSQL template

Information on defining column types in alasql

Information on NULL and undefinied in alasql

rosemm commented 7 months ago

Information on date fields: https://github.com/AlaSQL/alasql/wiki/Date (I think we might want to use DATE instead of Date)