|
|
|
|
|
by SOLAR_FIELDS
3476 days ago
|
|
One minor nit - normally a prod db is subject to availability restrictions that limit your ability to run 3 minute-long queries on them that suck up a bunch of resources. Nightly mirror to a staging/analysis db of sorts is a bit better practice. Window functions are extraordinarily powerful, as are Common Table Expressions (CTE's). I encourage anyone who uses SQL with any regularity to learn them immediately once they are comfortable with the more straightforward queries and clauses SQL offers. Once you've mastered windowing and CTE's, you'll wonder how you functioned without them. |
|
The workflow I use is to run simple select queries on prod databases. To bring the subset of data I'm interested in down locally Once I have the "extracts" I'm interested in I'll transform the data locally using SAS.
SAS has pretty powerful time interval routines which is what I'd typically use to compute something like the example in the article.
My work has just started looking at "big data" we have a new hadoop databases which is supposed to be used for that so I assume if I ever need to start looking into data stored there it will make more sense to run the SQL "on the database". So the article has some useful info there.