3 ms·
> KDB+ .. looks to have its own language to query it And that's a good thing. You can use sql to query it if you want by starting the query with "s)" in the c
by beagle3 12y ago
> KDB+ .. looks to have its own language to query it
And that's a good thing.
You can use sql to query it if you want by starting the query with "s)" in the console, or simply by using the ODBC/JDBC drivers.
But KDB+ embraces order in a way that SQL does not, which means that if you limit yourself to SQL then you miss out on a lot power that KDB gives you.
For example, say you want to select a list of (date,teacher) records ordered by date, and out of these pick out the records in which the teacher is not the same as in the previous date.
In kdb+, it's "select from (select from records by date) where differ teacher" (or just "&~=':teacher[<date]" if you use K notation). What's the SQL equivalent?
- makmanalp 12y agoAt first I thought you could do this with window functions (http://www.postgresql.org/docs/9.1/static/tutorial-window.html http://www.postgresql.org/docs/9.1/static/tutorial-window.ht...) but now I'm not so sure, or at least it doesn't seem very straightforward to me - very neat!