An export query can project table rows into a stable text shape without writing a file.

Program

Play the script to choose a minimum order total and format matching rows as CSV-style lines.

format_export_rows.sql
CREATE TABLE orders (id INTEGER, total INTEGER, status TEXT);
INSERT INTO orders VALUES (101, 40, 'paid'), (102, 15, 'open'), (103, 75, 'paid');
WITH params(min_total) AS (VALUES ()) SELECT id || ',' || total || ',' || status AS csv_line FROM orders WHERE total >= (SELECT min_total FROM params) ORDER BY id;
CREATE TABLE orders (id INTEGER, total INTEGER, status TEXT);
INSERT INTO orders VALUES (101, 40, 'paid'), (102, 15, 'open'), (103, 75, 'paid');
WITH params(min_total) AS (VALUES ()) SELECT id || ',' || total || ',' || status AS csv_line FROM orders WHERE total >= (SELECT min_total FROM params) ORDER BY id;
CREATE TABLE orders (id INTEGER, total INTEGER, status TEXT);
INSERT INTO orders VALUES (101, 40, 'paid'), (102, 15, 'open'), (103, 75, 'paid');
WITH params(min_total) AS (VALUES ()) SELECT id || ',' || total || ',' || status AS csv_line FROM orders WHERE total >= (SELECT min_total FROM params) ORDER BY id;
projection The query returns only the columns needed by the export shape.
concatenation `||` joins values into a CSV-style text line.
deterministic export The replay shows export-shaped rows as query output, keeping the example static and repeatable.