Build text-to-SQL right into your product

Power your data applications with the world’s first SQL API built with generative AI. 

waii query create “Show me monthly sales per store that deviated more than 10% from average” WITH avg_monthly_sales AS ( SELECT AVG(ss_sales_price - ss_ext_discount_amt) AS avg_sales, d_month_seq FROM tweakit_playground.retail_data.store_sales AS ss INNER JOIN tweakit_playground.retail_data.date_dim AS dd ON ss.ss_sold_date_sk = dd.d_date_sk WHERE EXTRACT(YEAR FROM dd.d_date) = 2023 GROUP BY d_month_seq ) monthly_sales AS ( SELECT s.s_store_sk, s.s_company_id, i.i_brand, i.i_category, dd.d_month_seq, SUM(ss_sales_price - ss_ext_discount_amt) AS sales FROM tweakit_playground.retail_data.store_sales AS ss INNER JOIN tweakit_playground.retail_data.date_dim AS dd ON ss.ss_sold_date_sk = dd.d_date_sk INNER JOIN tweakit_playground.retail_data.item AS i ON ss.ss_item_sk = i.i_item_sk INNER JOIN tweakit_playground.retail_data.store AS s ON ss.ss_store_sk = s.s_store_sk WHERE EXTRACT(YEAR FROM dd.d_date) = 2023 GROUP BY s.s_store_sk, s.s_company_id, i.i_brand, i.i_category, dd.d_month_seq ) SELECT ms.s_store_sk, ms.s_company_id, ms.i_brand, ms.i_category, ms.d_month_seq, ms.sales, ms.sales - LAG(ms.sales) OVER (PARTITION BY ms.s_store_sk, ms.s_company_id ORDER BY ms.d_month_seq) AS prev_deviation, ms.sales - LEAD(ms.sales) OVER (PARTITION BY ms.s_store_sk, ms.s_company_id ORDER BY ms.d_month_seq) AS next_deviation FROM monthly_sales AS ms INNER JOIN avg_monthly_sales AS ams ON ms.d_month_seq = ams.d_month_seq WHERE ABS(ms.sales - ams.avg_sales) / NULLIF(ams.avg_sales, 0) > 0.1 ORDER BY ms.s_store_sk, ms.s_company_id, ms.d_month_seq
01

Accurate

Get the most complete and accurate translation of plain English to SQL available. Waii combines a purpose-built compiler and optimizer with the latest AI models and the most complete coverage of SQL to achieve 90%+ accuracy compared to an industry standard of ~60%.

02

Performant

Generate queries optimized for your database. No outages due to inefficient SQL. Push down the right operations to reduce data early, limit the scan set, and optionally use single pass algorithms.

cat “web-vs-store-spend-report.sql” | time waii query run Running... 1117.1 seconds waii query create “Find customers whose spending increase was larger for the web than in stores last year” | time waii query run let’s see how the generated query performs Running... 223.5 seconds
waii context add "An active user is someone who logged in at least once in the last 30 days." --schema web_traffic Context added. waii query create "Give me monthly active users in the last 2 years" SELECT date_trunc('month', login_timestamp) AS month, count(distinct user_id) AS active_users FROM web_traffic.user_activity WHERE login_timestamp >= now() - interval '2 years' AND login_timestamp > now() - interval '30 days' GROUP BY month ORDER BY month ASC;
03

Customized

Produce SQL that’s 100% in tune with your business. Automatically build a persistent semantic layer to customize the system to your business and database, not the other way round.

Features

No database is too complex

The Waii API scales to thousands of databases, schemas, tables and columns.

Handles the hard SQL tasks

From UDFs, JSON, semi-structured data, geo-location, table functions, DML, DDL, streaming extensions and more.

Works out of the box

Hook up your database and start generating. A built-in compiler and optimizer ensures queries run from the get go.

With security you can count on

Manage access to your database and models with fine grained controls. Limit permissions to metadata only.

And much more...

Go beyond query generation with textual explain, semantic search, dialect translation, optimization, and auto-complete.

Get started with Waii today!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.