

2022-02-02 04:28:40.840224
SELECT DISTINCT supplier_id  
            FROM 0_subcontractor_invoices subi  
                JOIN 0_subcontractor_invoice_details subid ON 
                    subid.order_no = subi.order_no      
                JOIN 0_list_values lc  
                    ON lc.id = subid.category_id 
            WHERE subi.project_id ='10'                 
                AND lc.value_code IN ('RETENTION')

2022-02-02 04:28:40.841967
SELECT i.*, SUM(d.amount) amount,
                    supp.supp_name  
            FROM 0_subcontractor_invoices i 
                JOIN 0_subcontractor_invoice_details d 
                    ON d.order_no = i.order_no 
                JOIN 0_suppliers supp 
                    ON i.supplier_id = supp.supplier_id 
                JOIN 0_list_values lc  
                    ON lc.id = d.category_id 
            WHERE i.project_id = '10' 
                AND i.supplier_id ='6' 
                AND lc.value_code IN ('RETENTION') GROUP BY i.order_no  ORDER BY i.ord_date 

2022-02-02 04:28:40.852011
SELECT i.*, SUM(d.amount) amount,
                    supp.supp_name  
            FROM 0_subcontractor_invoices i 
                JOIN 0_subcontractor_invoice_details d 
                    ON d.order_no = i.order_no 
                JOIN 0_suppliers supp 
                    ON i.supplier_id = supp.supplier_id 
                JOIN 0_list_values lc  
                    ON lc.id = d.category_id 
            WHERE i.project_id = '10' 
                AND i.supplier_id ='4' 
                AND lc.value_code IN ('RETENTION') GROUP BY i.order_no  ORDER BY i.ord_date 

2022-02-02 04:28:40.858318
SELECT i.*, SUM(d.amount) amount,
                    supp.supp_name  
            FROM 0_subcontractor_invoices i 
                JOIN 0_subcontractor_invoice_details d 
                    ON d.order_no = i.order_no 
                JOIN 0_suppliers supp 
                    ON i.supplier_id = supp.supplier_id 
                JOIN 0_list_values lc  
                    ON lc.id = d.category_id 
            WHERE i.project_id = '10' 
                AND i.supplier_id ='159' 
                AND lc.value_code IN ('RETENTION') GROUP BY i.order_no  ORDER BY i.ord_date 

2022-02-02 04:28:40.864362
SELECT i.*, SUM(d.amount) amount,
                    supp.supp_name  
            FROM 0_subcontractor_invoices i 
                JOIN 0_subcontractor_invoice_details d 
                    ON d.order_no = i.order_no 
                JOIN 0_suppliers supp 
                    ON i.supplier_id = supp.supplier_id 
                JOIN 0_list_values lc  
                    ON lc.id = d.category_id 
            WHERE i.project_id = '10' 
                AND i.supplier_id ='158' 
                AND lc.value_code IN ('RETENTION') GROUP BY i.order_no  ORDER BY i.ord_date 

2022-02-02 04:28:40.870907
SELECT p.* 
            FROM 0_projects_master p 
            WHERE p.project_id ='10'

