Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json and sql update #3

Open
wants to merge 1 commit into
base: text2sql
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions promptJSON
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
Instruction: Generate a natural language statement from the given data.

Input:{COMPANY_NAME:Clarifai,AMOUNT__M_:60.0,ROUND:Series C}
Output: Clarifai attained 60M of funding for Series C.END
Input:{YEAR:1985,TEAM_ID:ATL,PLAYER_ID:barkele01}
Output: Player barkele01 played in team ATL in the year 1985

Input:{COMPANY_NAME:Clarifai,TOTALFUND:100.11999999}
Output: Clarifai recieved a total funding of 100.1M dollars. END

Input:{NewUsed:Used,TotalSales:555,DealerName:ABC motors,SalesPersonName:Mark Stevens,Count:3}{NewUsed:Used,TotalSales:213,DealerName:ABC motors,SalesPersonName:Mark Stevens,Count:5}
Output: Mark Stevens from ABC motors generated 555 dollars selling 3 used cars and 5 new cars.END

Input:{Make:Honda,TotalSales:5000,DealerName:ABC motors,SalesPersonName:Mark Stevens,Count:3}{Make:Toyota,TotalSales:2000,DealerName:ABC motors,SalesPersonName:Mark Stevens,Count:2}
Output: The top makes Mark Stevens sold are Honda and Toyota.END
Input:{Salary:550000,player_id:barkele01,league_id:NL}
Output: Player barkele01 received a salary of 550000 in the league NL

68 changes: 11 additions & 57 deletions promptSQL
Original file line number Diff line number Diff line change
@@ -1,70 +1,24 @@
Instruction: You are a developer writing SQL queries given natural language questions. The database contains a table. The schema of the table with description of the attributes is given. Write the SQL query given a natural language statement.
Here is the table.

Database Table Name: FUNDINGROUND
Table Schema:
COMPANY_NAME # The name of the company
ROUND # Round
DATE # Date
AMOUNT__M_ # funding ammount
INVESTORS # investors
VALUATION_MIN__M_ # minimum company valuation
VALUATION_MAX__M_ # maximum company valuation
REVENUE_MIN__M_ SMALLINT # minimum revenue
REVENUE_MAX__M_ SMALLINT # maximum revenue
REVENUE_MULTIPLE_MIN__M_ # minimum multiple revenue
REVENUE_MULTIPLE_MAX__M_ # maximum multiple revenue
REVENUE_TIME_PERIOD # revenue time period

Database Table Name: BUSINESSRELATIONSHIPS
Table Schema:
COMPANY_NAME # The name of the company
DATE # Date of relationship
BUSINESS_PARTNER # business partner name
TYPE VARCHAR # business partner relationship type
COUNTRY VARCHAR # country
NEWS_SNIPPET # news snippet

Database Table Name: CAPTABLE
Table Schema:
COMPANY_NAME # The name of the company
ROUND # Round
SHARES_AUTHORIZED # Shares authorized
PAR_VALUE # par value
DIVIDEND_RATE # divided date
ISSUANCE_PRICE # issuance price
LIQUIDATION_PRICE # liquidation price
LIQUIDATION_MULTIPLE # liquidation multiple
CONVERSION_PRICE # conversion price
__Owned VARCHAR # Owned
LIQUIDATION_PREFERENCE # liquidation preference
PARTICIPATION VARCHAR # participation
DIVIDEND_PREFERENCES # divided preferences
ANTI_DILUTION # anti dilution
BOARD_VOTING # board voting
GENERAL_VOTING # general voting

Database Table Name: COMPETITORS
Table Schema:
COMPANY_NAME # The name of the company
COMPETITOR # competitor name
SCORE # score
LAST_FUNDING # last funding
STAGE # stage
TOTAL_FUNDING # total funding
MOSAIC # mosaic
LOCATION # location
Database Table Name: DATAINGESTION_TEST_13MARCH
Table Schema:THEHISTORYOFBASEBALL
YEAR # The year in which they player was playing
TEAM_ID # Team in which the player was playing
LEAGUE_ID # The League ID in which the player was playing for year
PLAYER_ID # Player id of the player
SALARY # Salary of the player


Input:
How much funding did Clarifai achive at Series C?
How much is the salary of barkele01 in the year 1985?

Output:
select company_name,amount__m_,round from fundinground where company_name = 'Clarifai' and round = 'Series C';
select salary from thehistoryofbaseball.dataingestion_test_13MARCH where player_id = 'barkele01' and year = 1985;


Input:
What is the total funding for Clarifai?
What is the team id in which perryge01 played?

Output:
select company_name,sum(amount__m_) as totalfund from cbinsights.fundinground where company_name = 'Clarifai' group by company_name;
select team_id, player_id, league_id from thehistoryofbaseball.dataingestion_test_13MARCH where player_id = 'perryge01' group by team_id;