PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Q

Q

Q is a pl created in 2003 by Arthur Whitney.

#335on PLDB 19Years Old 765Users
1Books 2Papers 768Repos

Q is a proprietary array processing language developed by Arthur Whitney and commercialized by Kx Systems. The language serves as the query language for kdb+, a disk based and in-memory, column-based database. kdb+ is based upon K, a terse variant of APL. Read more on Wikipedia...


Example from hello-world:
"Hello World"
Example from the Hello World Collection:
/* Hello world in Q */ hello = writes "Hello, world!\n";
Example from Linguist:
dst:`:tq src:`:tqsrc F:key src / trade fields (types;widths) trf after 200609 tf:`time`ex`sym`s`cond`size`price`stop`corr`seq`cts`trf tt:("TCSS*IFBIJCC ";9 1 6 10 4 9 11 1 2 16 1 1,1+20060930<"I"$-8#string first F) / quote fields (types;widths) qf:`time`ex`sym`s`bid`bsize`ask`asize`cond`mmid`bex`aex`seq`bbo`qbbo`corr`cqs qt:("TCSSFIFIC*CCJCCCC ";9 1 6 10 11 7 11 7 1 4 1 1 16 1 1 1 1 2) / sym[.s] "e"$pricebidask g:{[f;x]`sym`time xcols delete s from @[;`sym;{$[null y;x;` sv x,y]}';x`s]@[x;f;"e"$%;1e4]} foo:{[d;f;t;g;x]@[;`sym;`p#].Q.dsftg[(dst;"D"$-8#string x;d);(` sv src,x;sum t 1;0);f;t;g]} \t foo[`trade;tf;tt;g[`price] ]each F where F like"taqtrade*[0-9]"; \t foo[`quote;qf;qt;g[`bid`ask]]each F where F like"taqquote*[0-9]"; \ http://www.nyxdata.com/Data-Products/Daily-TAQ
Example from Wikipedia:
q)select from t where name like "ja*",age>50 name age -------- jack 60 q)select rows:count i by age from t age| rows ---| ---- 20 | 1 50 | 2 60 | 1

Language features

Feature Supported Example Token
Strings
"Hello world"
"

Books about Q from ISBNdb

title authors year publisher
Q For Mortals: A Tutorial In Q Programming Borror, Jeffry A. 2008 CreateSpace Independent Publishing Platform

Publications about Q from Semantic Scholar

title authors year citations influentialCitations
Static Type Inference for the Q language using Constraint Logic Programming Zsolt Zombori and J. Csorba and P. Szeredi 2012 4 0
Programming quantum computers: a primer with IBM Q and D-Wave exercises F. Mueller and Greg Byrd and P. Dreher 2019 3 0
less.html · q.html · json-schema.html

View source

PLDB - Build the next great programming language · v2022 · Day 33 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com