conversations
listlengths
2
2
source
stringclasses
1 value
score
int64
5
5
[ { "from": "human", "value": "Different banks present in Gaya district under bank sakhi" }, { "from": "gpt", "value": " select distinct(a.bank_name) from m_agentnew a\ninner join m_bankdataupload b on a.agent_id=b.agent_id\nwhere b.agent_name is not null\nand upper(a.district_name)='GAYA'\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "District wise count of banks under bank sakhi" }, { "from": "gpt", "value": " select a.district_name, count(distinct a.bank_id) from m_agentnew a\ninner join m_bankdataupload b on a.agent_id=b.agent_id\nwhere b.agent_name is not null\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Count of Number of banks in Rafiganj block under bank sakhi" }, { "from": "gpt", "value": " select count(distinct a.bank_id) from m_agentnew a\ninner join m_bankdataupload b on a.agent_id=b.agent_id\nwhere b.agent_name is not null\nand upper(a.block_name)='RAFIGANJ'\n" } ]
5
[ { "from": "human", "value": "Block wise count of banks under bank sakhi" }, { "from": "gpt", "value": " select a.block_name, count(distinct a.bank_id) from m_agentnew a\ninner join m_bankdataupload b on a.agent_id=b.agent_id\nwhere b.agent_name is not null\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Panchayat wise count of banks under bank sakhi" }, { "from": "gpt", "value": " select a.panchayat_name, count(distinct a.bank_id) from m_agentnew a\ninner join m_bankdataupload b on a.agent_id=b.agent_id\nwhere b.agent_name is not null\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Total bank sakhi" }, { "from": "gpt", "value": " select count(distinct agent_id) from m_agentnew \nwhere name is not null\n" } ]
5
[ { "from": "human", "value": "Total bank sakhi in Gaya district" }, { "from": "gpt", "value": "select count(distinct agent_id) from m_agentnew \nwhere name is not null\nand upper(district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "District wise count of bank sakhi " }, { "from": "gpt", "value": "select district_name, count(distinct agent_id) from m_agentnew \nwhere name is not null\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "District wise count of agent along with bank name under bank sakhi " }, { "from": "gpt", "value": "select district_name, bank_name, count(distinct agent_id) from m_agentnew \nwhere name is not null\nGroup by 1,2\n" } ]
5
[ { "from": "human", "value": "District wise name of agent under bank sakhi " }, { "from": "gpt", "value": "select district_name, name from m_agentnew \nwhere name is not null\nGroup by 1,2\n" } ]
5
[ { "from": "human", "value": "District wise Bank sakhi name" }, { "from": "gpt", "value": "select district_name, name from m_agentnew \nwhere name is not null\nGroup by 1,2\n" } ]
5
[ { "from": "human", "value": "District wise count of agent along with bank name under bank sakhi " }, { "from": "gpt", "value": "select district_name, bank_name, count(distinct agent_id) from m_agentnew \nwhere name is not null\nGroup by 1,2\nlimit 20\n" } ]
5
[ { "from": "human", "value": "Total agent in bank sakhi" }, { "from": "gpt", "value": " select count(distinct agent_id) from m_agentnew \nwhere name is not null\n" } ]
5
[ { "from": "human", "value": "Total agent in bank sakhi in Gaya district" }, { "from": "gpt", "value": "select count(distinct agent_id) from m_agentnew \nwhere name is not null\nand upper(district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "Count of full fleged BS agent" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_agentnew a\nwhere status='full fleged'\n" } ]
5
[ { "from": "human", "value": "Count of full fleged BS agent in gaya district " }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_agentnew a\nwhere status='full fleged' and upper(district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "District wise count of full fleged BS agent " }, { "from": "gpt", "value": "select district_name, count(distinct a.agent_id) from m_agentnew a\nwhere status='full fleged'\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Count of full fleged BS agent in Adapur" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_agentnew a\nwhere status='full fleged' and upper(block_name)='ADAPUR'\n" } ]
5
[ { "from": "human", "value": "Block wise count of full fleged BS agent " }, { "from": "gpt", "value": "select block_name, count(distinct a.agent_id) from m_agentnew a\nwhere status='full fleged'\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Count of pay point BS agent" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_agentnew a\nwhere status='Pay Point'\n" } ]
5
[ { "from": "human", "value": "Count of pay point BS agent in gaya district " }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_agentnew a\nwhere status='Pay Point' and upper(district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "District wise count of pay point BS agent " }, { "from": "gpt", "value": "select district_name, count(distinct a.agent_id) from m_agentnew a\nwhere status='Pay Point'\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Count of pay point BS agent in Adapur" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_agentnew a\nwhere status='pay point' and upper(block_name)='ADAPUR'\n" } ]
5
[ { "from": "human", "value": "Block wise count of pay point BS agent " }, { "from": "gpt", "value": "select block_name, count(distinct a.agent_id) from m_agentnew a\nwhere status='pay point'\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Total count of transacted agent in bank sakhi" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_bankdataupload a\nInner JOin m_agentnew b ON a.agent_ID=b.agent_ID\nwhere a.agent_id is not null \nAND a.isactive='TRUE'\nAND a.total_amt_of_tranx !=0\nAND b.district_name IS NOT NULL\n" } ]
5
[ { "from": "human", "value": "Total count of transacted agent in gaya district under bank sakhi" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_bankdataupload a\nInner JOin m_agentnew b ON a.agent_ID=b.agent_ID\nwhere a.agent_id is not null \nAND a.isactive='TRUE'\nAND a.total_amt_of_tranx !=0\nAND upper(b.district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "District wise count of transacted agent in bank sakhi" }, { "from": "gpt", "value": "select b.district_name, count(distinct a.agent_id) from m_bankdataupload a\nInner JOin m_agentnew b ON a.agent_ID=b.agent_ID\nwhere a.agent_id is not null \nAND a.isactive='TRUE'\nAND a.total_amt_of_tranx !=0\ngroup by 1\n" } ]
5
[ { "from": "human", "value": "Total count of transacted agent in ADAPUR block under bank sakhi" }, { "from": "gpt", "value": "select count(distinct a.agent_id) from m_bankdataupload a\nInner JOin m_agentnew b ON a.agent_ID=b.agent_ID\nwhere a.agent_id is not null \nAND a.isactive='TRUE'\nAND a.total_amt_of_tranx !=0\nAND upper(b.block_name)='ADAPUR'\n" } ]
5
[ { "from": "human", "value": "Block wise count of transacted agent in bank sakhi" }, { "from": "gpt", "value": "select b.block_name, count(distinct a.agent_id) from m_bankdataupload a\nInner JOin m_agentnew b ON a.agent_ID=b.agent_ID\nwhere a.agent_id is not null \nAND a.isactive='TRUE'\nAND a.total_amt_of_tranx !=0\ngroup by 1\n" } ]
5
[ { "from": "human", "value": "Total count of iibf certified agent in bank sakhi" }, { "from": "gpt", "value": "select count(distinct mg.agent_id) from m_agentnew mg\ninner join m_bankdataupload mb on mg.agent_id=mb.agent_id\nwhere mb.agent_name is not null and mg.iibf='PASS'\n" } ]
5
[ { "from": "human", "value": "Total count of iibf certified agent in gaya district under bank sakhi" }, { "from": "gpt", "value": "select count(distinct mg.agent_id) from m_agentnew mg\ninner join m_bankdataupload mb on mg.agent_id=mb.agent_id\nwhere mb.agent_name is not null \nand mg.iibf='PASS'\nand upper(mg.district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "District wise count of iibf certified agent under bank sakhi" }, { "from": "gpt", "value": "select mg.district_name, count(distinct mg.agent_id) from m_agentnew mg\ninner join m_bankdataupload mb on mg.agent_id=mb.agent_id\nwhere mb.agent_name is not null \nand mg.iibf='PASS'\ngroup by 1\n" } ]
5
[ { "from": "human", "value": "Total count of iibf certified agent in Agiaon block under bank sakhi" }, { "from": "gpt", "value": "select count(distinct mg.agent_id) from m_agentnew mg\ninner join m_bankdataupload mb on mg.agent_id=mb.agent_id\nwhere mb.agent_name is not null \nand mg.iibf='PASS'\nand upper(mg.block_name)='AGIAON'\n" } ]
5
[ { "from": "human", "value": "Block wise count of iibf certified agent under bank sakhi" }, { "from": "gpt", "value": "select mg.block_name, count(distinct mg.agent_id) from m_agentnew mg\ninner join m_bankdataupload mb on mg.agent_id=mb.agent_id\nwhere mb.agent_name is not null \nand mg.iibf='PASS'\ngroup by 1\n" } ]
5
[ { "from": "human", "value": "Total number of account open in bank sakhi" }, { "from": "gpt", "value": "select sum(total_account_open) from m_bankdataupload where agent_name is not null" } ]
5
[ { "from": "human", "value": "Number of account open in bank sakhi in gaya district" }, { "from": "gpt", "value": "select sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\nand upper(b.district_name)='GAYA'\n " } ]
5
[ { "from": "human", "value": "District wise number of account open in bank sakhi" }, { "from": "gpt", "value": "select b.district_name, sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n Group by 1\n " } ]
5
[ { "from": "human", "value": "Number of account open in bank sakhi in Adapur block" }, { "from": "gpt", "value": "select sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\nand upper(b.block_name)='ADAPUR'\n " } ]
5
[ { "from": "human", "value": "Block wise number of account open in bank sakhi" }, { "from": "gpt", "value": "select b.block_name, sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n Group by 1\n " } ]
5
[ { "from": "human", "value": "Bank wise total no of account opened under bank sakhi" }, { "from": "gpt", "value": "select s.bank_name, sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n Group by 1\n " } ]
5
[ { "from": "human", "value": "Agent wise total no of account opened under bank sakhi" }, { "from": "gpt", "value": "select s.agent_name, sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n Group by 1\n " } ]
5
[ { "from": "human", "value": "Number of account open under Bank sakhi in year 2023" }, { "from": "gpt", "value": "select sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n and s.year='2023'\n " } ]
5
[ { "from": "human", "value": "Number of account open under Bank sakhi in gaya district in the year 2023" }, { "from": "gpt", "value": "select sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n and s.year='2023'\n and upper(b.district_name)='GAYA'\n " } ]
5
[ { "from": "human", "value": "Number of account open under Bank sakhi in Adapur block in the year 2023" }, { "from": "gpt", "value": "select sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n and s.year='2023'\n and upper(b.district_name)='GAYA'\n " } ]
5
[ { "from": "human", "value": "Year wise total no of account opened under bank sakhi" }, { "from": "gpt", "value": "select s.year, sum(s.total_account_open) from m_bankdataupload s\ninner join m_agentnew b on s.agent_id=b.agent_id\n where s.agent_name is not null\n Group by 1\n " } ]
5
[ { "from": "human", "value": "Total number of transaction in bank sakhi" }, { "from": "gpt", "value": "select sum(total_no_of_tranx) from m_bankdataupload where agent_name is not null\n " } ]
5
[ { "from": "human", "value": "Total number of transaction under bank sakhi in gaya district" }, { "from": "gpt", "value": "select sum(a.total_no_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null\nand upper(b.district_name)='GAYA'\n " } ]
5
[ { "from": "human", "value": "District wise number of transaction done under bank sakhi " }, { "from": "gpt", "value": "select b.district_name, sum(a.total_no_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null\ngroup by 1\n " } ]
5
[ { "from": "human", "value": "Total number of transaction under bank sakhi in ADHAURA block" }, { "from": "gpt", "value": "select sum(a.total_no_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null\nand upper(b.block_name)='ADHAURA'\n " } ]
5
[ { "from": "human", "value": "Block wise number of transaction done under bank sakhi " }, { "from": "gpt", "value": "select b.district_name, sum(a.total_no_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null\ngroup by 1\n " } ]
5
[ { "from": "human", "value": "Number of transaction done under bank sakhi in 2023" }, { "from": "gpt", "value": "select sum(a.total_no_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null\nand a.year='2023'\n " } ]
5
[ { "from": "human", "value": "Year wise number of transaction done under bank sakhi " }, { "from": "gpt", "value": "select a.year, sum(a.total_no_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null\ngroup by 1\n " } ]
5
[ { "from": "human", "value": "total amount of transaction in bank sakhi" }, { "from": "gpt", "value": "select sum(total_amt_of_tranx) from m_bankdataupload where agent_name is not null" } ]
5
[ { "from": "human", "value": "total amount of transaction in bank sakhi in Gaya district" }, { "from": "gpt", "value": "select sum(a.total_amt_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \nand upper(b.district_name)='GAYA'\n " } ]
5
[ { "from": "human", "value": "District wise total amount of transaction in bank sakhi" }, { "from": "gpt", "value": "select b.district_name, sum(a.total_amt_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \ngroup by 1\n " } ]
5
[ { "from": "human", "value": "total amount of transaction in bank sakhi in 2023" }, { "from": "gpt", "value": "select sum(a.total_amt_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \nand a.year='2023'\n " } ]
5
[ { "from": "human", "value": "Year wise total amount of transaction in bank sakhi" }, { "from": "gpt", "value": "select a.year, sum(a.total_amt_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \ngroup by 1\n " } ]
5
[ { "from": "human", "value": "Block wise total amount of transaction in bank sakhi" }, { "from": "gpt", "value": "select b.block_name, sum(a.total_amt_of_tranx) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \ngroup by 1\n " } ]
5
[ { "from": "human", "value": "Total full fleged BS in bank sakhi" }, { "from": "gpt", "value": "select count(distinct agent_id) from m_agentnew \nwhere name is not null and status='full fleged'\n " } ]
5
[ { "from": "human", "value": "total commission earned in bank sakhi" }, { "from": "gpt", "value": "select sum(total_commission) from m_bankdataupload where agent_name is not null" } ]
5
[ { "from": "human", "value": "total commission earned in gaya district under bank sakhi" }, { "from": "gpt", "value": "select sum(a.total_commission) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \nand upper(b.district_name)='GAYA'\n" } ]
5
[ { "from": "human", "value": "District wise commission earned under bank sakhi" }, { "from": "gpt", "value": "select b.district_name, sum(a.total_commission) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \ngroup by 1\n" } ]
5
[ { "from": "human", "value": "District wise Bank name along with name of bank sakhi" }, { "from": "gpt", "value": "select b.district_name, (a.bank_name), b.name from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\ngroup by 1,2,3\n" } ]
5
[ { "from": "human", "value": "Project wise number of district under bank sakhi" }, { "from": "gpt", "value": "select b.project_code, count(distinct a.district_id) from m_agentnew a\ninner join m_block_2 b on b.block_id::integer= a.block_id\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "Project wise number of transacted bank sakhi" }, { "from": "gpt", "value": "SELECT \n b.project_code,\n COUNT(DISTINCT CASE WHEN COALESCE(BD.Total_No_of_Tranx, 0) > 0 THEN bd.Agent_ID END) AS TTL_Transacted_Agent\nFROM \n m_cbo c\nINNER JOIN \n m_block_2 b ON b.block_id = c.block_id::integer\njoin M_AgentNew a on a.Block_ID=b.BLOCK_ID\n\n JOIN \n M_BankDataUpload BD ON bd.Agent_ID=a.agent_id \nWHERE \n c.cbo_type_id = 1 \n AND c.record_status = 1 \n AND c.cbo_id IN (SELECT DISTINCT cbo_id FROM t_acc_voucher)\nGROUP BY 1\n" } ]
5
[ { "from": "human", "value": "Project wise number of bank sakhi" }, { "from": "gpt", "value": "select b.project_code, count(distinct a.agent_id) from m_agentnew a\ninner join m_block_2 b on b.block_id::integer= a.block_id\nGroup by 1\n" } ]
5
[ { "from": "human", "value": "total commission earned in 2023 under bank sakhi" }, { "from": "gpt", "value": "select sum(a.total_commission) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \nand a.year='2023'\n" } ]
5
[ { "from": "human", "value": "Year wise commission earned under bank sakhi" }, { "from": "gpt", "value": "select a.year, sum(a.total_commission) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \ngroup by 1\n" } ]
5
[ { "from": "human", "value": "total commission earned in Adapur block under bank sakhi" }, { "from": "gpt", "value": " select sum(a.total_commission) from m_bankdataupload a\ninner join m_agentnew b on a.agent_id=b.agent_id\nwhere a.agent_name is not null \nand upper(b.block_name)='ADAPUR'\n" } ]
5
[ { "from": "human", "value": "total count of agent in 2018 and 2019 in bank sakhi" }, { "from": "gpt", "value": " SELECT COUNT(DISTINCT mg.agent_id) FROM m_agentnew mg \nINNER JOIN m_bankdataupload mb ON mg.agent_id = mb.agent_id \nWHERE mb.agent_name IS NOT NULL \nAND mg.is_active='TRUE'\nAND mg.date_of_activation BETWEEN '2018-04-01' AND '2019-03-31'\n" } ]
5
[ { "from": "human", "value": "total count of agent in BANKA" }, { "from": "gpt", "value": "SELECT COUNT(DISTINCT mg.agent_id) \nFROM m_agentnew mg \nINNER JOIN m_bankdataupload mb ON mg.agent_id = mb.agent_id \nWHERE mb.agent_name IS NOT NULL \nAND upper(mg.district_name)='BANKA'" } ]
5
[ { "from": "human", "value": "In how many districts poultry is there?" }, { "from": "gpt", "value": "select count(distinct district_id) as total_districts\n from mp_pg_member" } ]
5
[ { "from": "human", "value": "Poultry is open in how many districts?" }, { "from": "gpt", "value": "select count(distinct district_id) as total_districts\n from mp_pg_member" } ]
5
[ { "from": "human", "value": "Poultry is open in how many districts in IPDS-2 scheme?" }, { "from": "gpt", "value": "select count(distinct a.district_id) as total_districts\n from mp_pg_member a\n\t\t\tinner join t_household_batch b on a.member_id = b.member_id\n\t\t\twhere upper(b.scheme) = 'IPDS-2'" } ]
5
[ { "from": "human", "value": "In how many blocks poultry is there?" }, { "from": "gpt", "value": "select distinct count(distinct block_id) from mp_pg_member a\ninner join t_household_batch b on a.pg_id = b.pg_id::integer\n " } ]
5
[ { "from": "human", "value": "Poultry is open in how many blocks?" }, { "from": "gpt", "value": "select distinct count(distinct block_id) from mp_pg_member a\ninner join t_household_batch b on a.pg_id = b.pg_id::integer\n " } ]
5
[ { "from": "human", "value": "Poultry is open in how many blocks in IPDS-2 scheme?" }, { "from": "gpt", "value": "select count(distinct a.block_id) as total_districts\n from mp_pg_member a\n\t\t\tinner join t_household_batch b on a.member_id = b.member_id\n\t\t\twhere upper(b.scheme) = 'IPDS-2'" } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry?" }, { "from": "gpt", "value": "select count(distinct pg_id) as total_pgs\n from t_household_batch" } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry in IPDS-2 scheme?" }, { "from": "gpt", "value": "select count(distinct pg_id) as total_pgs\n from t_household_batch\n where upper(scheme) = 'IPDS-2'" } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry in patna" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where upper(c.district_name) = 'PATNA'" } ]
5
[ { "from": "human", "value": "No of PG in Poultry in Madhubani District" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where upper(c.district_name) = 'MADHUBANI'\n " } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry in patna in IPDS-2 scheme" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where upper(c.district_name) = 'PATNA'\n and upper(scheme) = 'IPDS-2'" } ]
5
[ { "from": "human", "value": "No of PG in Poultry under IPDS-2 & IPDS-3 in Madhubani District separately" }, { "from": "gpt", "value": "select 'IPDS-2: ' || count(distinct a.pg_id) as result\nfrom t_household_batch a\ninner join mp_pg_member b on a.member_id = b.member_id\ninner join m_district c on b.district_id = c.district_id\nwhere upper(c.district_name) = 'MADHUBANI'\nand upper(scheme) = 'IPDS-2'\nunion all\nselect 'IPDS-3: ' || count(distinct a.pg_id) as result\nfrom t_household_batch a\ninner join mp_pg_member b on a.member_id = b.member_id\ninner join m_district c on b.district_id = c.district_id\nwhere upper(c.district_name) = 'MADHUBANI'\nand upper(scheme) = 'IPDS-3'\n " } ]
5
[ { "from": "human", "value": "No of poultry PG in IPDS-2 in Buxar" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where upper(c.district_name) = 'BUXAR'\n and upper(scheme) = 'IPDS-2'\n " } ]
5
[ { "from": "human", "value": "District wise count of pg in IPDS-2 scheme" }, { "from": "gpt", "value": "select c.district_name, count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n Where upper(scheme) = 'IPDS-2'\n\t\t\tGroup by c.district_name\n " } ]
5
[ { "from": "human", "value": "No of districts which have been covered by IPDS-3 along with list of PG id from each district" }, { "from": "gpt", "value": "select c.district_name, b.pg_id as pg_id\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n Where upper(scheme) = 'IPDS-3'\n\t\t\tGroup by c.district_name, b.pg_id\n\t\t\tlimit 20\n " } ]
5
[ { "from": "human", "value": "List of Member ID of IPDS-3 members in Banka district" }, { "from": "gpt", "value": "SELECT district_name,\n STRING_AGG(pg_id::text, ', ' ORDER BY pg_id) AS pg_ids\nFROM (\n SELECT DISTINCT c.district_name, b.pg_id\n FROM t_household_batch a\n INNER JOIN mp_pg_member b ON a.member_id = b.member_id\n INNER JOIN m_district c ON b.district_id = c.district_id\n WHERE UPPER(scheme) = 'IPDS-3'\n AND UPPER(c.district_name) = 'BANKA'\n) AS subquery\nGROUP BY district_name\n " } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry in arrah block" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_block c on b.block_id = c.block_id\n where upper(c.block_name) = 'ARRAH'" } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry in arrah block in IPDS-2 scheme" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_block c on b.block_id = c.block_id\n where upper(c.block_name) = 'ARRAH'\n and upper(scheme) = 'IPDS-2'" } ]
5
[ { "from": "human", "value": "What is the total number of pg in poultry in 2023" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n where b.created_on BETWEEN '2023-01-01' AND '2023-12-31'" } ]
5
[ { "from": "human", "value": "Total number of pg in poultry in 2023-2024" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n where b.created_on BETWEEN '2023-04-01' AND '2024-03-31'" } ]
5
[ { "from": "human", "value": "Total number of pg in poultry in 2023-2024 in nalanda?" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where b.created_on BETWEEN '2023-04-01' AND '2024-03-31'\n and upper(c.district_name) = 'PATNA'" } ]
5
[ { "from": "human", "value": "Total number of pg in poultry in 2023-2024 in arrah block?" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_block c on b.block_id = c.block_id\n where b.created_on BETWEEN '2023-04-01' AND '2024-03-31'\n and upper(c.block_name) = 'ARRAH'" } ]
5
[ { "from": "human", "value": "what is the total number of pgs in poultry in patna in 2023-2024" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where upper(c.district_name) = 'PATNA'\n\t\t\tand b.created_on BETWEEN '2023-04-01' AND '2024-03-31'" } ]
5
[ { "from": "human", "value": "Total number of pg in poultry in january 2024" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n where b.created_on BETWEEN '2024-01-01' AND '2024-01-31'" } ]
5
[ { "from": "human", "value": "Total number of pg in poultry in january 2024 in nalanda" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where b.created_on BETWEEN '2024-01-01' AND '2024-01-31'\n and upper(c.district_name) = 'NALANDA'" } ]
5
[ { "from": "human", "value": "Total number of pg in poultry in january 2024 in arrah block" }, { "from": "gpt", "value": "select count(distinct a.pg_id) as total_pgs\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_block c on b.block_id = c.block_id\n where b.created_on BETWEEN '2024-01-01' AND '2024-01-31'\n and upper(c.block_name) = 'ARRAH'" } ]
5
[ { "from": "human", "value": "what is the total number of beneficiaries or members in poultry?" }, { "from": "gpt", "value": "select count(distinct member_id) as total_members\n from t_household_batch" } ]
5
[ { "from": "human", "value": "what is the total number of beneficiaries or members in poultry in IPDS-2 scheme?" }, { "from": "gpt", "value": "select count(distinct member_id) as total_members\n from t_household_batch\n where upper(scheme) = 'IPDS-2'" } ]
5
[ { "from": "human", "value": "what is the total number of beneficiaries or members in poultry in patna" }, { "from": "gpt", "value": "select count(distinct a.member_id) as total_members\n from t_household_batch a\n inner join mp_pg_member b on a.member_id = b.member_id\n inner join m_district c on b.district_id = c.district_id\n where upper(c.district_name) = 'PATNA'" } ]
5