From 8e394c9282c2328c7614a393302885e9900dd7bc Mon Sep 17 00:00:00 2001 From: Mohamed Arif Date: Tue, 17 Sep 2024 16:48:03 -0700 Subject: [PATCH] json and sql update --- promptJSON | 14 ++++------- promptSQL | 68 +++++++++--------------------------------------------- 2 files changed, 15 insertions(+), 67 deletions(-) diff --git a/promptJSON b/promptJSON index 834af03..b3fb225 100644 --- a/promptJSON +++ b/promptJSON @@ -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 diff --git a/promptSQL b/promptSQL index f266b8c..6a0ca1e 100644 --- a/promptSQL +++ b/promptSQL @@ -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; \ No newline at end of file +select team_id, player_id, league_id from thehistoryofbaseball.dataingestion_test_13MARCH where player_id = 'perryge01' group by team_id; \ No newline at end of file