Skip to main content

sqlp

The sqlp command executes SQL queries on CSV files.

Syntax

qsv sqlp [options] <query> <input_file> [<output_file>]

Description

The sqlp command is used to execute SQL queries on CSV files. This is useful for performing complex data manipulations and analysis using SQL.

Options

  • --no-headers: When set, the first row will not be interpreted as headers

Examples

Execute SQL

Execute an SQL query on a CSV file:

qsv sqlp "SELECT * FROM DLD_Transactions_English_500 WHERE transaction_id = '123456'" DLD_Transactions_English_500.csv | qsv table

Common Use Cases

  • Performing complex data manipulations
  • Data analysis using SQL

Tips

  • Verify the output to ensure the query is correctly executed
  • Use in combination with other commands for complex data processing

See Also

  • select - for selecting specific columns
  • apply - for data transformations