mithrandie / csvq

SQL-like query language for csv
https://mithrandie.github.io/csvq
MIT License
1.5k stars 65 forks source link

top support #9

Closed peheje closed 5 years ago

peheje commented 5 years ago

Is the top command supported in any way?

E.g. select top 10 * from myfile

mithrandie commented 5 years ago

You can use limit clause or fetch clause in select query.

https://mithrandie.github.io/csvq/reference/select-query.html#limit_clause

For example, the following queries will return the results you want.

SELECT * FROM filename LIMIT 10;
SELECT * FROM filename FETCH FIRST 10 ROWS ONLY;
peheje commented 5 years ago

Thanks!