SQL statement:
Select T.type, COUNT (t.id) as Todo_count from Mc_job_form t where t.state = ' 2 ' and T.customs_code =: a GROUP by T.type
Table structure:
ID VARCHAR2 (N) ID
In_out_flag CHAR (1) Y
PROVIDER_ID number Y
apply_form_id VARCHAR2 (Y)
declare_apply_id VARCHAR2 (Y)
proposer_id VARCHAR2 (Y)
manual_id CHAR (Y)
Trade_type VARCHAR2 (3) Y
Company_code CHAR (Y)
Company_Name NVARCHAR2 (m) Y
Provider_name NVARCHAR2 (m) Y
Gross_weight number (19,5) Y
Net_weight number (19,5) Y
AMOUNT number (19,5) Y
Wrap_type VARCHAR2 (Y)
Trunk_no NVARCHAR2 (255) Y
Create_time DATE Y
Declare_time DATE Y
In_time DATE Y
Customs_code CHAR (4) Y
PORT CHAR (4) Y
Remark NVARCHAR2 (255) Y
State CHAR (1) Y
COMMENTS NVARCHAR2 (Y)
TYPE VARCHAR2 (2) Y
Proposer NVARCHAR2 (Y)
Out_time DATE Y
Proposer_phone VARCHAR2 (Y)
Contract_no VARCHAR2 (Y)
Tally_comments NVARCHAR2 (Y)
Tally_time DATE Y
Tally_approve_comments NVARCHAR2 (Y)
asso_job_form_id VARCHAR2 (Y)
Data_origin CHAR (1) Y
Guaranty_amount number (19,5) Y
Asso_flag CHAR (1) Y
Area_type CHAR (1) Y