106 words
1 minute
PondPilot with Files
testing blog

Testing sql widget with local file#

SELECT COUNT(*) AS rows_in_orders FROM main.orders;

Sql basic operations#

SELECT * FROM main.orders ORDER BY order_id LIMIT 5;
SELECT 
    o.order_id, 
    o.customer, 
    c.tier, 
    o.amount
FROM main.orders o
JOIN main.customers c USING(customer)
ORDER BY o.order_id;

Create New Table (will give ERROR)#

CREATE OR REPLACE TABLE products AS
SELECT * FROM (VALUES
    (1, 'Widget', 29.99),
    (2, 'Gadget', 49.50),
    (3, 'Doohickey', 15.00),
    (4, 'Thingamajig', 99.95),
    (5, 'Whatsit', 10.00)
) AS t(product_id, product_name, price);

SELECT * FROM products;

Join New Table with Existing Data#

SELECT 
    o.order_id,
    o.customer,
    c.tier,
    p.product_name,
    o.amount as price
FROM main.orders o
JOIN main.customers c USING(customer)
JOIN products p ON o.amount = p.price
ORDER BY o.order_id;
PondPilot with Files
https://aneeqasif.github.io/posts/testing/pondpilot-file/
Author
Aneeq Asif Azad
Published at
2026-09-09
License
CC BY-NC-SA 4.0