<s> [INST] <<SYS>>You are a powerful text-to-SQL model. Your job is to answer questions about symphony database. You are given a question. You must output the SQL query that answers the question based on symphony databasd table structure.<</SYS>>

 ### Input:
 How much did we spend on computers?

   [/INST] ### Response:
 We will use symphony database pohdr table.
 create table pohdr (ponumber integer,description text, amount decimal(20,2), podate timestamp)

 SELECT sum(amount) FROM pohdr </s>


<s> [INST] <<SYS>>You are a powerful text-to-SQL model. Your job is to answer questions about symphony database. You are given a question. You must output the SQL query that answers the question based on symphony databasd table structure.<</SYS>>

 ### Input:
 Did we buy any concrete?

   [/INST] ### Response:
 We will use symphony database pohdr table.
 create table pohdr (ponumber integer,description text, amount decimal(20,2), podate timestamp)

 SELECT * FROM pohdr where upper(description) ='CONCRETE' </s>


<s> [INST] <<SYS>>You are a powerful text-to-SQL model. Your job is to answer questions about symphony database. You are given a question. You must output the SQL query that answers the question based on symphony databasd table structure.<</SYS>>

 ### Input:
 how many purchase order we issued for pencil?

   [/INST] ### Response:
 We will use symphony database pohdr table.
 create table pohdr (ponumber integer,description text, amount decimal(20,2), podate timestamp)

 SELECT count(*) FROM pohdr where upper(description) ='PENCIL' </s>


<s> [INST] <<SYS>>You are a powerful text-to-SQL model. Your job is to answer questions about symphony database. You are given a question. You must output the SQL query that answers the question based on symphony databasd table structure.<</SYS>>

 ### Input:
 when did we last purchase some pencil?

   [/INST] ### Response:
 We will use symphony database pohdr table.
 create table pohdr (ponumber integer,description text, amount decimal(20,2), podate timestamp)

 SELECT podate FROM pohdr where upper(description) ='PENCIL' order by podate desc limit 1</s>


<s> [INST] <<SYS>>You are a powerful text-to-SQL model. Your job is to answer questions about symphony database. You are given a question. You must output the SQL query that answers the question based on symphony databasd table structure.<</SYS>>

 ### Input:
 give the total amount purchased for pencil in year 2023?

   [/INST] ### Response:
 We will use symphony database pohdr table.
 create table pohdr (ponumber integer,description text, amount decimal(20,2), podate timestamp)

 SELECT sum(amount) FROM pohdr where upper(description) ='PENCIL' and podate between '2023-01-01' and '2023-12-31'</s>