프로젝트
GitHub에서 보기
cfahlgren1/natural-sql
소개
성능이 뛰어난 Text-to-SQL LLM 시리즈
데이터 및 분석측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalNaturalSQL by ChatDB
NaturalSQL by ChatDB is a series of models with state-of-the-art performance on Text to SQL instructions.
Introducing NaturalSQL-7B
Percentage of Correct SQL Queries on Novel Schemas
Big thanks to the folks at Defog for open sourcing the SQL-Eval framework

NaturalSQL-7B is the leading model for it's size, benchmarked on SQL-Eval.
Example
Question: Determine the customer with the largest total order value last month, and list all the products and their quantities they ordered.
Output:
WITH
LastMonthOrders AS (
SELECT
o.customerid,
o.orderid,
op.productid,
op.quantity,
p.productname,
op.quantity * p.unitprice AS total_order_value
FROM
orders o
JOIN order_details op ON o.orderid = op.orderid
JOIN products p ON op.productid = p.productid
WHERE
o.orderdate >= date_trunc('month', CURRENT_DATE) - INTERVAL '1 month'
AND o.orderdate < date_trunc('month', CURRENT_DATE)
),
CustomerTotalOrderValue AS (
SELECT
customerid,
SUM(total_order_value) AS total_value
FROM
LastMonthOrders
GROUP BY
customerid
ORDER BY
total_value DESC
LIMIT
1
)
SELECT
c.customerid,
c.companyname,
lm.productid,
lm.productname,
lm.quantity
FROM
CustomerTotalOrderValue ctov
JOIN LastMonthOrders lm ON ctov.customerid = lm.customerid
JOIN customers c ON c.customerid = lm.customerid;
NaturalQuery performs really well with subqueries, ratios, and questions like above.
License
This repo code is licensed under apache-2.0, the model license is CC BY-SA 4.0.
관련 프로젝트 살펴보기
불러오는 중…