What is the equivalent query in KDB Web:
SELECT * FROM TABLE
WHERE (COLA = 'A' AND COLB = 'B') OR (COLA = 'C' AND COLB = 'D')
http://kdbserver:5001/?select fro table where _____________________
N.B.: cola and colb are having string datatype
kdb+ is a column-based relational time series database (TSDB) with in-memory (IMDB) abilities, developed and marketed by Kx Systems. The database is commonly used in high-frequency trading (HFT) to store, analyze, process, and retrieve large data sets at high speed.
Kdb+ is a powerful database that can be used for streaming, real-time and historical data. Q is the SQL-like, general-purpose programming language built on top of kdb+. It offers high-performance, in-database analytic capabilities. Get started to download and install kdb+.
Kdb+ is an in-memory, column-based database with much of the same functions of a relational database management system. The database supports SQL, SQL-92 and ksql, a query language with a syntax similar to SQL and designed for column based queries and array analysis.
A vector is a list of atoms of the same type. Some examples: 2 3 4 5 / int "A fine, clear day" / char `ibm`goog`aapl`ibm`msft / symbol 2017.01 2017.02 2017.03m / month. Kdb+ stores and handles vectors very efficiently. Q operators – not just +-*% but e.g. mcount , ratios , prds – are optimised for vectors.
You can do:
select from table where ((COLA like "string1")&(COLB like "string2"))|((COLA like "string3")&(COLB like "string4"))
select from table where ([]colA;colB) in ([]colA:`A`C;colB:`B`D)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With