Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CSV QueryNew to Visual Studio Code? Get it now.
CSV Query

CSV Query

KneenXServicers

|
2 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CSV Query

Query any CSV file with SQL directly inside VS Code. Open a panel that previews the file, lets you write SQL against it, and shows results in a sortable, filterable, groupable table.

Features

  • Preview any CSV — opens the file and shows the first 50 rows in a clean table.
  • Run SQL queries — full SQL via alasql. The CSV is exposed as a table named csv.
  • Suggested queries — the extension inspects your headers and column cardinality on load and proposes useful queries (list IDs, count by column, filter by value, find empty cells, and more).
  • Sortable, filterable results — click any column header to sort. Filter results globally or per-column.
  • Group with drill-down — group results by any column to see counts, then expand any group to see the underlying rows.
  • Table or raw CSV view — toggle between a formatted table and raw CSV output of the current results.

Usage

  1. Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
  2. Run CSV Query: Open Query Panel.
  3. Pick a CSV file when prompted.
  4. Type a SQL query (or pick one from the 💡 Suggest dropdown) and press Cmd+Enter / Ctrl+Enter.

Example queries

-- Top 100 rows
SELECT * FROM csv LIMIT 100

-- Filter by a list of IDs (wrap column names with spaces in backticks)
SELECT * FROM csv WHERE `Person Number` IN (1234, 5678, 91011)

-- Group and count
SELECT State, COUNT(*) AS cnt FROM csv GROUP BY State ORDER BY cnt DESC

-- Substring match
SELECT * FROM csv WHERE Email LIKE '%@kleenXServices.org%'
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft