df = df[(df.vote_count >= 50) &(df.budget * df.revenue * df.popularity * df.vote_average !=0)].reset_index(drop = 'True')

时间: 2024-06-02 22:11:15 浏览: 130
这个代码的意思是筛选出 DataFrame df 中满足以下条件的行: - vote_count 列的值大于等于 50; - budget 列、revenue 列、popularity 列、vote_average 列的乘积不等于 0。 并将满足条件的行重新编号后返回一个新的 DataFrame。其中,reset_index 方法的参数 drop='True' 表示将原来的索引列丢弃,生成新的整数索引列。
相关问题

# Dataloader if webcam: show_vid = check_imshow() cudnn.benchmark = True # set True to speed up constant image size inference dataset = LoadStreams(source, img_size=imgsz, stride=stride) nr_sources = len(dataset.sources) else: dataset = LoadImages(source, img_size=imgsz, stride=stride) nr_sources = 1 vid_path, vid_writer, txt_path = [None] * nr_sources, [None] * nr_sources, [None] * nr_sources # initialize StrongSORT cfg = get_config() cfg.merge_from_file(opt.config_strongsort) # Create as many strong sort instances as there are video sources strongsort_list = [] for i in range(nr_sources): strongsort_list.append( StrongSORT( strong_sort_weights, device, half, max_dist=cfg.STRONGSORT.MAX_DIST, max_iou_distance=cfg.STRONGSORT.MAX_IOU_DISTANCE, max_age=cfg.STRONGSORT.MAX_AGE, n_init=cfg.STRONGSORT.N_INIT, nn_budget=cfg.STRONGSORT.NN_BUDGET, mc_lambda=cfg.STRONGSORT.MC_LAMBDA, ema_alpha=cfg.STRONGSORT.EMA_ALPHA,

这段代码是一个数据加载器(Dataloader)的实现。根据`webcam`变量的取值(True或False),选择不同的数据加载方式。 如果`webcam`为True,则使用`LoadStreams`类加载视频流数据,设置图像大小为`imgsz`,采样间隔为`stride`。同时,通过`check_imshow`函数检查是否可以使用`imshow`函数显示视频。 如果`webcam`为False,则使用`LoadImages`类加载图像数据,设置图像大小为`imgsz`,采样间隔为`stride`。 根据数据加载的方式,确定了数据集的数量`nr_sources`。 接下来,根据配置文件初始化StrongSORT(一种目标跟踪算法)。通过调用`get_config`函数获取配置信息,并将其合并到StrongSORT的配置中。 然后,根据视频源的数量创建相应数量的StrongSORT实例,并将它们存储在`strongsort_list`列表中。每个StrongSORT实例具有不同的参数设置,包括强排序权重、设备类型、是否使用半精度等。 最后,代码中还有一些关于StrongSORT参数的设置,如最大距离、最大IOU距离、最大年龄等等。这些参数可以根据具体需求进行调整。

优化这个sql SELECT count( 1 ) FROM ( SELECT B.ID, B.PURCHASE_REQUEST_ID, B.MATERIAL_ID, B.MATERIAL_CODE, B.MATERIAL_NAME, B.STANDARD, B.MODEL_ID, B.BILL_ROW_ID, B.BILL_NO, BILL_NAME, B.MODEL_CODE, B.MODEL_NAME, B.PARENT_MODEL_ID, B.PARENT_MODEL_CODE, B.PARENT_MODEL_NAME, B.UNIT_CODE, B.UNIT_NAME, B.PURCHASE_TYPE_CODE, CAST( NVL( B.APPLY_NUM, 0 ) AS NUMBER ( 24, 10 ) ) AS APPLY_NUM, CAST( NVL( B.DEAL_NUM, 0 ) AS NUMBER ( 24, 10 ) ) AS DEAL_NUM, CAST( NVL( B.RETURN_NUM, 0 ) AS NUMBER ( 24, 10 ) ) AS RETURN_NUM, B.DEAL_USER_ID, B.DEAL_USER_NAME, CAST( NVL( B.PRICE, 0 ) AS NUMBER ( 24, 10 ) ) AS PRICE, CAST( NVL( B.AMOUNT, 0 ) AS NUMBER ( 24, 10 ) ) AMOUNT, B.IMPLEMENT_CODE, B.IMPLEMENT_NAME, B.IMPLEMENT_INVEST_AMOUNT, B.PURCHASE_MANAGER_ID, B.PURCHASE_MANAGER_NAME, B.PROVIDER_ID, B.PROVIDER_NAME, B.REMARK, B.DELIVER_AREA, B.DELIVER_ADDRESS, B.RECEIVE_PEOPLE, B.RECEIVE_PEOPLE_PHONE, B.ITEM_STATUS, B.COST_CENTER, B.COST_BUDGET_CODE, B.COST_IMPLEMENT_NAME, B.FRAME_CONT_ID, B.FRAME_CONT_CODE, B.FRAME_CONT_NAME, B.DETAIL_CONFIG, B.PURCHASE_CATEGORY_CODE, B.INVOICE_TITLE_CODE, B.INVOICE_SEND_ADDRRSS, B.MATERIAL_REQUEST_ITEM_ID, B.YEAR, B.DELETE_FLAG, B.PROVINCE_CODE, B.REASON, B.PARENT_ITEM_ID, B.FRAME_CONT_ITEM_ID, B.SUB_MATERIAL_REQUEST_ID, B.SUB_MATERIAL_REQUEST_CODE, B.MATERIAL_URL, B.RECOMMEND_PROVIDER_NAMES, C.PURCHASE_REQUEST_CODE, C.PURCHASE_REQUEST_NAME, C.APPLY_TYPE_CODE, C.CREATOR_NAME, C.APPLY_TELEPHONE, C.COMPANY_NAME, C.DEPT_NAME, B.CREATE_TIME, TO_CHAR( B.CREATE_TIME, 'YYYY-MM-DD' ) CREATE_TIME_STR, C.ARRIVE_TIME, C.IS_TO_END, C.MONEY_WAY_CODE, C.OWN, C.APPLY_CATEGORY_CODE, C.manu_Type, C.BILL_ID, MMD.MATERIAL_TYPE_CODE, B.BRANCH_COMPANY_DEAL_USER_ID, B.BRANCH_COMPANY_DEAL_USER_NAME, ( SELECT ORG_NAME FROM ORGANIZATIONS WHERE DELETE_FLAG = '0' AND ORG_CODE = ( SELECT PARENT_COMPANY_NO FROM ORGANIZATIONS WHERE ID = B.MATERIAL_DEPT_ID )) AS MATERIAL_COMPANY_NAME, B.ORIGINAL, B.PROVIDER_PRODUCT_MODEL, B.PROVIDER_PRODUCT_NAME, B.PRODUCT_DESC, B.Back_Flag, CASE WHEN MMD.material_type_code = 'WZ' THEN '1' WHEN MMD.material_type_code = 'FW' THEN '2' ELSE '3' END apply_category_code_item, NVL( C.IS_CARDSYSTEM_REQUEST, '0' ) IS_CARDSYSTEM_REQUEST, B.APPLY_GROUP_AUTHORITES, B.SCIENTIFIC_RESEARCH_ID, B.SCIENTIFIC_RESEARCH_CODE, B.SCIENTIFIC_RESEARCH_NAME, B.PREQUALFY_CODE, nvl( C.IS_QUICK, '0' ) AS IS_QUICK, C.PURCHASE_WAY_CODE, C.PURCHASE_TYPE_CODE PURCHASE_TYPE_CODE_P, C.ORIGINAL_TYPE, C.PURCHASE_REQUEST_BILLS_TYPE, B.IS_FRAME_CONT_MONAD FROM PURCHASE_REQUEST_ITEM B LEFT JOIN PURCHASE_REQUEST C ON B.PURCHASE_REQUEST_ID = C.ID LEFT JOIN MATERIAL_DATA MMD ON MMD.ID = B.MATERIAL_ID AND MMD.DELETE_FLAG = '0' WHERE B.delete_flag = '0' AND B.Item_Status IN ( 1 ) AND NOT EXISTS ( SELECT * FROM purchase_request_item_log pril WHERE B.id = pril.purchase_request_item_id AND pril.lock_status = '1' AND pril.delete_flag = '0' ) AND ( ( c.apply_type_code NOT IN ( '20', '41', '3' ) AND nvl( B.Apply_Num, 0 ) > nvl( B.Deal_Num, 0 )) OR c.apply_type_code IN ( '20', '41', '3' ) ) AND B.Deal_User_Id =: 1 AND C.MONEY_WAY_CODE =: 2 AND C.APPLY_TYPE_CODE =: 3 AND C.PAY_OUT_TYPE_CODE =: 4 AND C.APPLY_CATEGORY_CODE =: 5 AND NVL( C.IS_CARDSYSTEM_REQUEST, '0' ) = : 6 AND NOT EXISTS ( SELECT * FROM purchase_request_item p left join material_province mp ON p.material_id = mp.material_id WHERE p.delete_flag = 0 AND mp.delete_flag = 0 AND mp.material_status = 03 AND mp.org_code = p.province_code AND p.id = B.id ) ORDER BY C.ID, B.ID ASC)

首先,可以将子查询中的所有列名改为别名,这样可以避免重名和提高代码可读性。另外,可以尝试使用 EXISTS 子查询来替换 NOT EXISTS 子查询,因为 EXISTS 子查询的性能通常更好。最后,可以考虑对 WHERE 子句中的多个条件进行逻辑上的分组,以避免出现过于复杂的条件表达式。下面是优化后的 SQL: SELECT COUNT(1) FROM ( SELECT b.ID, b.PURCHASE_REQUEST_ID, b.MATERIAL_ID, b.MATERIAL_CODE, b.MATERIAL_NAME, b.STANDARD, b.MODEL_ID, b.BILL_ROW_ID, b.BILL_NO, b.BILL_NAME, b.MODEL_CODE, b.MODEL_NAME, b.PARENT_MODEL_ID, b.PARENT_MODEL_CODE, b.PARENT_MODEL_NAME, b.UNIT_CODE, b.UNIT_NAME, b.PURCHASE_TYPE_CODE, CAST(NVL(b.APPLY_NUM, 0) AS NUMBER(24, 10)) AS APPLY_NUM, CAST(NVL(b.DEAL_NUM, 0) AS NUMBER(24, 10)) AS DEAL_NUM, CAST(NVL(b.RETURN_NUM, 0) AS NUMBER(24, 10)) AS RETURN_NUM, b.DEAL_USER_ID, b.DEAL_USER_NAME, CAST(NVL(b.PRICE, 0) AS NUMBER(24, 10)) AS PRICE, CAST(NVL(b.AMOUNT, 0) AS NUMBER(24, 10)) AMOUNT, b.IMPLEMENT_CODE, b.IMPLEMENT_NAME, b.IMPLEMENT_INVEST_AMOUNT, b.PURCHASE_MANAGER_ID, b.PURCHASE_MANAGER_NAME, b.PROVIDER_ID, b.PROVIDER_NAME, b.REMARK, b.DELIVER_AREA, b.DELIVER_ADDRESS, b.RECEIVE_PEOPLE, b.RECEIVE_PEOPLE_PHONE, b.ITEM_STATUS, b.COST_CENTER, b.COST_BUDGET_CODE, b.COST_IMPLEMENT_NAME, b.FRAME_CONT_ID, b.FRAME_CONT_CODE, b.FRAME_CONT_NAME, b.DETAIL_CONFIG, b.PURCHASE_CATEGORY_CODE, b.INVOICE_TITLE_CODE, b.INVOICE_SEND_ADDRRSS, b.MATERIAL_REQUEST_ITEM_ID, b.YEAR, b.DELETE_FLAG, b.PROVINCE_CODE, b.REASON, b.PARENT_ITEM_ID, b.FRAME_CONT_ITEM_ID, b.SUB_MATERIAL_REQUEST_ID, b.SUB_MATERIAL_REQUEST_CODE, b.MATERIAL_URL, b.RECOMMEND_PROVIDER_NAMES, c.PURCHASE_REQUEST_CODE, c.PURCHASE_REQUEST_NAME, c.APPLY_TYPE_CODE, c.CREATOR_NAME, c.APPLY_TELEPHONE, c.COMPANY_NAME, c.DEPT_NAME, b.CREATE_TIME, TO_CHAR(b.CREATE_TIME, 'YYYY-MM-DD') CREATE_TIME_STR, c.ARRIVE_TIME, c.IS_TO_END, c.MONEY_WAY_CODE, c.OWN, c.APPLY_CATEGORY_CODE, c.manu_Type, c.BILL_ID, MMD.MATERIAL_TYPE_CODE, b.BRANCH_COMPANY_DEAL_USER_ID, b.BRANCH_COMPANY_DEAL_USER_NAME, (SELECT ORG_NAME FROM ORGANIZATIONS WHERE DELETE_FLAG = '0' AND ORG_CODE = (SELECT PARENT_COMPANY_NO FROM ORGANIZATIONS WHERE ID = b.MATERIAL_DEPT_ID)) AS MATERIAL_COMPANY_NAME, b.ORIGINAL, b.PROVIDER_PRODUCT_MODEL, b.PROVIDER_PRODUCT_NAME, b.PRODUCT_DESC, b.Back_Flag, CASE WHEN MMD.material_type_code = 'WZ' THEN '1' WHEN MMD.material_type_code = 'FW' THEN '2' ELSE '3' END apply_category_code_item, NVL(c.IS_CARDSYSTEM_REQUEST, '0') IS_CARDSYSTEM_REQUEST, b.APPLY_GROUP_AUTHORITES, b.SCIENTIFIC_RESEARCH_ID, b.SCIENTIFIC_RESEARCH_CODE, b.SCIENTIFIC_RESEARCH_NAME, b.PREQUALFY_CODE, NVL(c.IS_QUICK, '0') AS IS_QUICK, c.PURCHASE_WAY_CODE, c.PURCHASE_TYPE_CODE PURCHASE_TYPE_CODE_P, c.ORIGINAL_TYPE, c.PURCHASE_REQUEST_BILLS_TYPE, b.IS_FRAME_CONT_MONAD FROM PURCHASE_REQUEST_ITEM b LEFT JOIN PURCHASE_REQUEST c ON b.PURCHASE_REQUEST_ID = c.ID LEFT JOIN MATERIAL_DATA MMD ON MMD.ID = b.MATERIAL_ID AND MMD.DELETE_FLAG = '0' WHERE b.delete_flag = '0' AND b.Item_Status IN (1) AND b.Deal_User_Id = :1 AND C.MONEY_WAY_CODE = :2 AND C.APPLY_TYPE_CODE = :3 AND C.PAY_OUT_TYPE_CODE = :4 AND C.APPLY_CATEGORY_CODE = :5 AND NVL(C.IS_CARDSYSTEM_REQUEST, '0') = :6 AND EXISTS ( SELECT * FROM purchase_request_item_log pril WHERE B.id = pril.purchase_request_item_id AND pril.lock_status = '1' AND pril.delete_flag = '0' ) AND ( c.apply_type_code IN ('20', '41', '3') OR ( c.apply_type_code NOT IN ('20', '41', '3') AND NVL(b.Apply_Num, 0) > NVL(b.Deal_Num, 0) ) ) AND NOT EXISTS ( SELECT * FROM purchase_request_item p LEFT JOIN material_province mp ON p.material_id = mp.material_id WHERE p.delete_flag = 0 AND mp.delete_flag = 0 AND mp.material_status = 03 AND mp.org_code = p.province_code AND p.id = b.id ) ORDER BY c.ID, b.ID ASC )
阅读全文

相关推荐

改为pgsql select c.* from ( select a.* from ( SELECT t.PROJ_ID,t.PROJ_CODE,t.PROJ_NAME,t.CLIENT_CODE,t.CLIENT_NAME,t.SPEC_CODE,t.SPEC_NAME,t.BUS_UNIT_CODE,t.BUS_UNIT,t.PROJ_DEP_CODE,t.PROJ_DEP,t.PROJECT_MANAGER_CODE,t.PROJECT_MANAGER,t.PROJECT_DEP_MANAGER_CODE,t.PROJECT_DEP_MANAGER,t.IS_SUB_PROJ,t.SUB_PROJ_TYPE_CODE,t.SUB_PROJ_TYPE,t.PARENT_CODE,t.PROJ_GROSS,t.CLIENT_AREA_CODE,t.CLIENT_AREA,t.CLIENT_TYPE_FULL_PATH_CODE,t.CLIENT_TYPE_PULL_PATH,t.BUSINESS_TYPE_CODE,t.BUSINESS_TYPE,t.BUSINESS_LEVEL_CODE,t.BUSINESS_LEVEL,t.BUSINESS_AREA_CODE,t.BUSINESS_AREA_NAME,t.IS_CLOSE,t.IS_IN_COO,t.TAX_RATE,t.IS_AUTHORIZED,t.AUTHORIZED_AMOUNT,t.IS_VIRTUAL,t.INCOME_BUDGET,t.EXPENDITURE_BUDGET,t.P_VALUE,t.CREATE_TIME,t.P_BUD_VALUE,t.P1_BUD_VALUE,t.P2_BUD_VALUE,t.ORG_CODE,t.ORG_NAME,t.PROD_RES_TYPE,t.IS_TECH_COO,t.COO_UNIT_RATIO,t.PROJ_ACHIEVEMENTS_BUD,t.REIMBURSEMENT_COST_BUD,t.COO_COST_BUD,t.MATERIAL_COST_BUD,t.PERFORMANCE_PERCENT,t.SCHE_START_TIME,t.SCHE_END_TIME,t.PROJECT_ACCOUNT_CODE,t.CUSTOMER_TYPE_CODE,t.CUSTOMER_TYPE,t.IS_PURE_OUT_PROJ,t.PROJECT_CREATE_TIME,t.IS_RELATE,t.IS_QUOTA,t.MAIN_PROJECT_CODE,t.PROJ_STATUS,t.IS_LARGE_PROJECT,t.MARKET_DIS_COUNT_RATE,t.PROJECT_CAT,t.MGR_PER_FORMANCE_RATIO,t.P1_VALUE,t.S_VALUE,t.COOP_VALUE,t.H_VALUE,t.DEVICE_BUDGET_COST,t.SUR_FEE_DIS_COUNT_RATE,t.DES_FEE_DIS_COUNT_RATE, (select listagg(p.coo_unit_code, ',') within group(order by p.coo_unit_code) from ( select distinct coo_unit_code from t_spdi_proj where is_sub_proj = 'Y' and sub_proj_type_code = 'wbhz' and PROJ_STATUS != 'P_5' AND PROJ_STATUS != 'P_4' and parent_code = t.proj_code )p ) coo_unit_code, (select listagg(to_char(p.coo_unit), ',') within group(order by p.coo_unit) from ( select distinct coo_unit from t_spdi_proj where is_sub_proj = 'Y' and sub_proj_type_code = 'wbhz' and PROJ_STATUS != 'P_5' AND PROJ_STATUS != 'P_4' and parent_code = t.proj_code )p ) coo_unit from T_SPDI_PROJ t where -- and t.PARENT_CODE=#{parentCode:VARCHAR} t.IS_SUB_PROJ='Y' and t.SUB_PROJ_TYPE_CODE='zz' and t.PROJ_STATUS NOT IN ('E','H','W') order by t.proj_id )a )c

使其简短些 SELECT * FROM ( SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, fpd.fpd_applied_amount AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "0" UNION ALL SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, sum( fpd.fpd_applied_amount ) AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "1" GROUP BY fpd_pay_num ) t1

将下面这条sql语句简化一下:SELECT * FROM ( SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, fpd.fpd_applied_amount AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "0" UNION ALL SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, sum( fpd.fpd_applied_amount ) AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "1" GROUP BY fpd_pay_num ) t1

将下面这条sql语句简短一些:SELECT * FROM ( SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, fpd.fpd_applied_amount AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "0" UNION ALL SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, sum( fpd.fpd_applied_amount ) AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "1" GROUP BY fpd_pay_num ) t1

将下面这条sql语句优化简短一些 :SELECT * FROM ( SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, fpd.fpd_applied_amount AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "0" UNION ALL SELECT fpd.fpd_id AS fpdId, fpd.fpd_budget_project AS fpdBudgetProject, fpd.fpd_budget_project_id AS fpdBudgetProjectId, fpd.fpd_pf_name AS fpdPfName, fpd.fpd_pf_id AS fpdPfId, fpd.fpd_expend_subject AS fpdExpendSubject, fpd.fpd_expend_subject_id AS fpdExpendSubjectId, fpd.fpd_payee_name AS fpdPayeeName, fpd.fpd_payee_account AS fpdPayeeAccount, fpd.fpd_payee_opening_bank AS fpdPayeeOpeningBank, fpd.fpd_payee_opening_bank_num AS fpdPayeeOpeningBankNum, fpd.fpd_dept_pay_economics_classify_num AS fpdDeptPayEconomicsClassifyNum, fpd.fpd_dept_pay_economics_classify_name AS fpdDeptPayEconomicsClassifyName, sum( fpd.fpd_applied_amount ) AS fpdAppliedAmount, fpd.fpd_capital_use AS fpdCapitalUse, fpd.fpd_postscript AS fpdPostscript, fpd.fpd_budget_item_name AS fpdBudgetItemName, fpd.fpd_budget_item_number AS fpdBudgetItemNumber, fpd.fpd_dr_name AS fpdDrName, dbec.dbec_parent_num AS dbecParentNum FROM financial_payment_details fpd LEFT JOIN dept_budget_economy_class dbec ON fpd.fpd_dept_pay_economics_classify_num = dbec.dbec_num WHERE fpd.fpd_is_tax = "1" GROUP BY fpd_pay_num ) t1

rar

最新推荐

recommend-type

英语四级高频单词、词组、短语.pdf

10. budget:预算,财务管理中的重要概念。 11. candidate:候选人,适用于选举或应聘职位。 12. transform:转变,变化,指事物的根本性变化。 13. transmit:传播,传输,如信息或疾病传播。 14. transplant:移植...
recommend-type

基于labview的改变字体大小源码.zip

labview源码参考示例,可供参考学习使用
recommend-type

基于labview的生产者消费者循环源码.zip

labview源码参考示例,可供参考学习使用
recommend-type

macOS 10.9至10.13版高通RTL88xx USB驱动下载

资源摘要信息:"USB_RTL88xx_macOS_10.9_10.13_driver.zip是一个为macOS系统版本10.9至10.13提供的高通USB设备驱动压缩包。这个驱动文件是针对特定的高通RTL88xx系列USB无线网卡和相关设备的,使其能够在苹果的macOS操作系统上正常工作。通过这个驱动,用户可以充分利用他们的RTL88xx系列设备,包括但不限于USB无线网卡、USB蓝牙设备等,从而实现在macOS系统上的无线网络连接、数据传输和其他相关功能。 高通RTL88xx系列是广泛应用于个人电脑、笔记本、平板和手机等设备的无线通信组件,支持IEEE 802.11 a/b/g/n/ac等多种无线网络标准,为用户提供了高速稳定的无线网络连接。然而,为了在不同的操作系统上发挥其性能,通常需要安装相应的驱动程序。特别是在macOS系统上,由于操作系统的特殊性,不同版本的系统对硬件的支持和驱动的兼容性都有不同的要求。 这个压缩包中的驱动文件是特别为macOS 10.9至10.13版本设计的。这意味着如果你正在使用的macOS版本在这个范围内,你可以下载并解压这个压缩包,然后按照说明安装驱动程序。安装过程通常涉及运行一个安装脚本或应用程序,或者可能需要手动复制特定文件到系统目录中。 请注意,在安装任何第三方驱动程序之前,应确保从可信赖的来源获取。安装非官方或未经认证的驱动程序可能会导致系统不稳定、安全风险,甚至可能违反操作系统的使用条款。此外,在安装前还应该查看是否有适用于你设备的更新驱动版本,并考虑备份系统或创建恢复点,以防安装过程中出现问题。 在标签"凄 凄 切 切 群"中,由于它们似乎是无意义的汉字组合,并没有提供有关该驱动程序的具体信息。如果这是一组随机的汉字,那可能是压缩包文件名的一部分,或者可能是文件在上传或处理过程中产生的错误。因此,这些标签本身并不提供与驱动程序相关的任何技术性知识点。 总结来说,USB_RTL88xx_macOS_10.9_10.13_driver.zip包含了用于特定高通RTL88xx系列USB设备的驱动,适用于macOS 10.9至10.13版本的操作系统。在安装驱动之前,应确保来源的可靠性,并做好必要的系统备份,以防止潜在的系统问题。"
recommend-type

PyCharm开发者必备:提升效率的Python环境管理秘籍

# 摘要 本文系统地介绍了PyCharm集成开发环境的搭建、配置及高级使用技巧,重点探讨了如何通过PyCharm进行高效的项目管理和团队协作。文章详细阐述了PyCharm项目结构的优化方法,包括虚拟环境的有效利用和项目依赖的管理。同时,本文也深入分析了版本控制的集成流程,如Git和GitHub的集成,分支管理和代码合并策略。为了提高代码质量,本文提供了配置和使用linters以及代码风格和格式化工具的指导。此外,本文还探讨了PyCharm的调试与性能分析工具,插件生态系统,以及定制化开发环境的技巧。在团队协作方面,本文讲述了如何在PyCharm中实现持续集成和部署(CI/CD)、代码审查,以及
recommend-type

matlab中VBA指令集

MATLAB是一种强大的数值计算和图形处理软件,主要用于科学计算、工程分析和技术应用。虽然它本身并不是基于Visual Basic (VB)的,但在MATLAB环境中可以利用一种称为“工具箱”(Toolbox)的功能,其中包括了名为“Visual Basic for Applications”(VBA)的接口,允许用户通过编写VB代码扩展MATLAB的功能。 MATLAB的VBA指令集实际上主要是用于操作MATLAB的工作空间(Workspace)、图形界面(GUIs)以及调用MATLAB函数。VBA代码可以在MATLAB环境下运行,执行的任务可能包括但不限于: 1. 创建和修改变量、矩阵
recommend-type

在Windows Forms和WPF中实现FontAwesome-4.7.0图形

资源摘要信息: "将FontAwesome470应用于Windows Forms和WPF" 知识点: 1. FontAwesome简介: FontAwesome是一个广泛使用的图标字体库,它提供了一套可定制的图标集合,这些图标可以用于Web、桌面和移动应用的界面设计。FontAwesome 4.7.0是该库的一个版本,它包含了大量常用的图标,用户可以通过简单的CSS类名引用这些图标,而无需下载单独的图标文件。 2. .NET开发中的图形处理: 在.NET开发中,图形处理是一个重要的方面,它涉及到创建、修改、显示和保存图像。Windows Forms和WPF(Windows Presentation Foundation)是两种常见的用于构建.NET桌面应用程序的用户界面框架。Windows Forms相对较为传统,而WPF提供了更为现代和丰富的用户界面设计能力。 3. 将FontAwesome集成到Windows Forms中: 要在Windows Forms应用程序中使用FontAwesome图标,首先需要将FontAwesome字体文件(通常是.ttf或.otf格式)添加到项目资源中。然后,可以通过设置控件的字体属性来使用FontAwesome图标,例如,将按钮的字体设置为FontAwesome,并通过设置其Text属性为相应的FontAwesome类名(如"fa fa-home")来显示图标。 4. 将FontAwesome集成到WPF中: 在WPF中集成FontAwesome稍微复杂一些,因为WPF对字体文件的支持有所不同。首先需要在项目中添加FontAwesome字体文件,然后通过XAML中的FontFamily属性引用它。WPF提供了一个名为"DrawingImage"的类,可以将图标转换为WPF可识别的ImageSource对象。具体操作是使用"FontIcon"控件,并将FontAwesome类名作为Text属性值来显示图标。 5. FontAwesome字体文件的安装和引用: 安装FontAwesome字体文件到项目中,通常需要先下载FontAwesome字体包,解压缩后会得到包含字体文件的FontAwesome-master文件夹。将这些字体文件添加到Windows Forms或WPF项目资源中,一般需要将字体文件复制到项目的相应目录,例如,对于Windows Forms,可能需要将字体文件放置在与主执行文件相同的目录下,或者将其添加为项目的嵌入资源。 6. 如何使用FontAwesome图标: 在使用FontAwesome图标时,需要注意图标名称的正确性。FontAwesome提供了一个图标检索工具,帮助开发者查找和确认每个图标的确切名称。每个图标都有一个对应的CSS类名,这个类名就是用来在应用程序中引用图标的。 7. 面向不同平台的应用开发: 由于FontAwesome最初是为Web开发设计的,将它集成到桌面应用中需要做一些额外的工作。在不同平台(如Web、Windows、Mac等)之间保持一致的用户体验,对于开发团队来说是一个重要考虑因素。 8. 版权和使用许可: 在使用FontAwesome字体图标时,需要遵守其提供的许可证协议。FontAwesome有多个许可证版本,包括免费的公共许可证和个人许可证。开发者在将FontAwesome集成到项目中时,应确保符合相关的许可要求。 9. 资源文件管理: 在管理包含FontAwesome字体文件的项目时,应当注意字体文件的维护和更新,确保在未来的项目版本中能够继续使用这些图标资源。 10. 其他图标字体库: FontAwesome并不是唯一一个图标字体库,还有其他类似的选择,例如Material Design Icons、Ionicons等。开发人员可以根据项目需求和偏好选择合适的图标库,并学习如何将它们集成到.NET桌面应用中。 以上知识点总结了如何将FontAwesome 4.7.0这一图标字体库应用于.NET开发中的Windows Forms和WPF应用程序,并涉及了相关的图形处理、资源管理和版权知识。通过这些步骤和细节,开发者可以更有效地增强其应用程序的视觉效果和用户体验。
recommend-type

【Postman进阶秘籍】:解锁高级API测试与管理的10大技巧

# 摘要 本文系统地介绍了Postman工具的基础使用方法和高级功能,旨在提高API测试的效率与质量。第一章概述了Postman的基本操作,为读者打下使用基础。第二章深入探讨了Postman的环境变量设置、集合管理以及自动化测试流程,特别强调了测试脚本的编写和持续集成的重要性。第三章介绍了数据驱动测试、高级断言技巧以及性能测试,这些都是提高测试覆盖率和测试准确性的关键技巧。第四章侧重于API的管理,包括版本控制、文档生成和分享,以及监控和报警系统的设计,这些是维护和监控API的关键实践。最后,第五章讨论了Postman如何与DevOps集成以及插件的使用和开发,展示了Postman在更广阔的应
recommend-type

ubuntu22.04怎么恢复出厂设置

### 如何在Ubuntu 22.04上执行恢复出厂设置 #### 清除个人数据并重置系统配置 要使 Ubuntu 22.04 恢复到初始状态,可以考虑清除用户的个人文件以及应用程序的数据。这可以通过删除 `/home` 目录下的所有用户目录来实现,但需要注意的是此操作不可逆,在实际操作前建议先做好重要资料的备份工作[^1]。 对于全局范围内的软件包管理,如果希望移除非官方源安装的应用程序,则可通过 `apt-get autoremove` 命令卸载不再需要依赖项,并手动记录下自定义安装过的第三方应用列表以便后续重新部署环境时作为参考[^3]。 #### 使用Live CD/USB进行修
recommend-type

2001年度广告运作规划:高效利用资源的策略

资源摘要信息:"2001年度广告运作规划" 知识点: 1. 广告运作规划的重要性:广告运作规划是企业营销战略的重要组成部分,它能够帮助企业明确目标、制定计划、优化资源配置,以实现最佳的广告效果和品牌推广。 2. 广告资源的利用:人力、物力、财力和资源是广告运作的主要因素。有效的广告规划需要充分考虑这些因素,以确保广告活动的顺利进行。 3. 广告规划的简洁性:简洁的广告规划更容易理解和执行,可以提高工作效率,减少不必要的浪费。 4. 广告规划的实用性:实用的广告规划能够为企业带来实际的效果,帮助企业提升品牌知名度,增加产品的销售。 5. 广告规划的参考价值:一份好的广告规划可以为其他企业提供参考,帮助企业更好地进行广告运作。 6. 广告规划的下载和分享:互联网为企业提供了方便的广告规划下载和分享平台,企业可以通过网络获取大量的广告规划资料,提高广告工作的效率和质量。 7. 广告规划的持续更新:随着市场环境的变化,广告规划也需要不断更新和完善,以适应新的市场环境。 8. 广告规划的实施:广告规划的成功实施需要团队的协作和执行,需要企业有明确的目标和计划,以及高效的执行力。 9. 广告规划的效果评估:广告规划的实施后,需要对广告效果进行评估,以便了解广告活动的成果,为未来的广告规划提供参考。 10. 广告规划的改进和优化:根据广告效果的评估结果,企业需要对广告规划进行改进和优化,以提高广告活动的效果。