Natural Language,Golden Query "List all PO headers with a valid vendor record in database","select * from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID" "List all details of PO headers which have a vendor in vendor table","select * from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID" "List all columns of PO headers that have a vendor present in vendor table","select * from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID" "List all vendors who have atleast 1 PO issued to them","select * from RETAILBUYER_VENDOR as t1 inner join RETAILBUYER_POHEADER as t2 on t2.VENDOR_ID = t1.VENDOR_ID" "List all details of Vendors who have POs issued to them","select * from RETAILBUYER_VENDOR as t1 inner join RETAILBUYER_POHEADER as t2 on t2.VENDOR_ID = t1.VENDOR_ID" "List all columns of vendor table who have been assigned POs","select * from RETAILBUYER_VENDOR as t1 inner join RETAILBUYER_POHEADER as t2 on t2.VENDOR_ID = t1.VENDOR_ID" "I would like to know the PO issuer and PO issue date for POs that have a vendor present in vendor table","select t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID" "Show me PO issuer and PO issue date for POs that have a vendor present in vendor table","select t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID" "List all vendor contact name and email ids for vendors who have been issued atleast 1 PO","select t1.contact_first_name, t1.contact_last_name, t1.contact_email from RETAILBUYER_VENDOR as t1 inner join RETAILBUYER_POHEADER as t2 on t2.VENDOR_ID = t1.VENDOR_ID" "List all vendor id, contact name, city and status for vendors who have POs","select t1.vendor_id, t1.contact_first_name, t1.contact_last_name, t1.vendor_city, t1.vendor_status from RETAILBUYER_VENDOR as t1 inner join RETAILBUYER_POHEADER as t2 on t2.VENDOR_ID = t1.VENDOR_ID" "I would like to know the PO issuer and PO issue date for POs that have a valid vendor that had to be shipped by 2021","select t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where YEAR(t2.PO_SHIPBY) = 2021" "Show me PO id, PO issuer and PO Ship by date for POs that have vendor in vendor table and PO ship by date in 2021","select t2.PO_ID, t2.PO_ISSUER, t2.PO_SHIPBY from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where YEAR(t2.PO_SHIPBY) = 2021" "I would like to know the PO issuer and PO issue date for POs where vendor is based out of Houston","select t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where t1.VENDOR_CITY = 'Houston'" "Show me PO id, PO issuer and PO Ship by date for POs whose vendors are in active status","select t2.PO_ID, t2.PO_ISSUER, t2.PO_SHIPBY from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where t1.VENDOR_STATUS = 'active'" "Show me PO id, PO issuer and PO Ship by date for POs whose vendors contact name starts with "Bar"","select t2.PO_ID, t2.PO_ISSUER, t2.PO_SHIPBY from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where t1.CONTACT_FIRST_NAME LIKE '%Bar%'" "List PO id, issuer and issue date for POs issued to vendors based out of Houston and status is active","select t2.PO_ID, t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where t1.VENDOR_CITY = 'Houston' and t1.VENDOR_STATUS = 'active'" "List PO issuer and PO issue date for POs where vendor is based out of Houston and vendor is in active status","select t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where t1.VENDOR_CITY = 'Houston' and t1.VENDOR_STATUS = 'active'" "List PO id, issuer, issue date, ship by date for POs issued to vendors present in vendor table and PO issue and ship by date are in 2021","select t2.PO_ID, t2.PO_ISSUER, t2.PO_ISSUEDT, t2.PO_SHIPBY from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where YEAR(t2.PO_ISSUEDT) = 2021 AND YEAR(t2.PO_SHIPBY) = 2021" "List PO id, issuer, issue date, ship by date for POs issued to valid vendors and PO issue and ship by date are both in 2021","select t2.PO_ID, t2.PO_ISSUER, t2.PO_ISSUEDT, t2.PO_SHIPBY from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where YEAR(t2.PO_ISSUEDT) = 2021 AND YEAR(t2.PO_SHIPBY) = 2021" "List PO id, issuer and issue date for POs where vendor is based out of Houston and PO ship by date is in 2021","select t2.PO_ID, t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where YEAR(t2.PO_ISSUEDT) = 2021 AND YEAR(t2.PO_SHIPBY) = 2021" "List PO id, issuer and issue date for POs where vendor is based out of Boston and PO issuer name starts with 'Dino'Aman6917/autotrain-data-exact_data","select t2.PO_ID, t2.PO_ISSUER, t2.PO_ISSUEDT from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.VENDOR_ID = t1.VENDOR_ID where t2.PO_ISSUER like 'Dino%' AND t1.Vendor_City = 'Boston'" "What is the maximum vendor id of vendor present in vendor table who has been issued a PO in 2021","select max(t1.vendor_id) from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.vendor_id = t1.vendor_id where YEAR(t2.po_issuedt) = 2021" "From how many different cities were the vendors who were issued a PO in 2021?","select count(distinct(t1.vendor_city)) from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.vendor_id = t1.vendor_id where YEAR(t2.po_issuedt) = 2021" "What is the maximum vendor id of vendor based out of Houston who has been issued a PO ","select max(t1.vendor_id) from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.vendor_id = t1.vendor_id where t1.Vendor_City = 'Houston'" "How many vendors based out of Houston have been issued a PO","select max(t1.vendor_id) from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 on t2.vendor_id = t1.vendor_id where t1.Vendor_City = 'Houston'" "How many vendors whose status is active or preferred have been issued a PO","select count(t1.vendor_id) from RETAILBUYER_POHEADER t2 inner join RETAILBUYER_VENDOR as t1 on t2.vendor_id = t1.vendor_id where t1.Vendor_status in ('active', 'preferred')" "What is the most recent ship by date for vendor who is based out of 'Houston'","select max(t2.po_shipby) from RETAILBUYER_POHEADER as t2 inner join RETAILBUYER_VENDOR as t1 ON t2.vendor_id = t1.vendor_id group by t1.vendor_city having t1.vendor_city = 'Houston'" "What are the product ids, descriptions and sum of quantities ordered for the products in purchase order line items","select L.product_id, t2.product_desc, sum(t1.quantity) from RETAILBUYER_PRODUCT_SOURCE as t2 INNER JOIN RETAILBUYER_POLINEITEM as t1 ON t2.PRODUCT_ID = t1.PRODUCT_ID GROUP BY t1.PRODUCT_ID, t2.product_desc" "What are the product ids and descriptions, sum of quantities ordered for products in purchase order line items ordered in descending order of quantity","select t1.product_id, t2.product_desc, sum(t1.quantity) from RETAILBUYER_PRODUCT_SOURCE as t1 INNER JOIN RETAILBUYER_POLINEITEM as t2 ON t2.PRODUCT_ID = t1.PRODUCT_ID GROUP BY t1.PRODUCT_ID, t1.product_desc order by sum(t2.quantity) desc" "List all vendors and their details for whom no PO has been issued","select * from RETAILBUYER_VENDOR where as t1endor_id not in (select as t1.vendor_id from RETAILBUYER_POHEADER)" "List all vendors details who have never had Pos issued to them","select * from RETAILBUYER_VENDOR where as t1.vendor_id not in (select as t1.vendor_id from RETAILBUYER_POHEADER)" "List all vendors information who have never had Pos issued to them","select * from RETAILBUYER_VENDOR where as t1.vendor_id not in (select as t1.vendor_id from RETAILBUYER_POHEADER)"