Database Queries

总计11条数据
TimeDurationTypeQuery
  
10:11:52.4742.3 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "id"=1001

10:11:52.4771.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001

10:11:52.49519.9 msSELECTSELECT COUNT(*) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE 0=1) "final" ORDER BY "bargain_date" DESC) "c"

10:11:52.5152.2 msSELECTSELECT SUM(budget) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE 0=1) "final" ORDER BY "bargain_date" DESC) "c"

10:11:52.5182.0 msSELECTSELECT SUM(budget / 100 * profit_pct) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE 0=1) "final" ORDER BY "bargain_date" DESC) "c"

10:11:52.5201.9 msSELECTSELECT SUM(collected) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE 0=1) "final" ORDER BY "bargain_date" DESC) "c"

10:11:52.5231.9 msSELECTSELECT COUNT(*) FROM (SELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE 0=1) "final" ORDER BY "bargain_date" DESC) "c"

10:11:52.5252.5 msSELECTSELECT (final.pstime + final.irtime) AS service_time, (final.pscount + final.ircount) AS service_count, final.* FROM (SELECT CASE WHEN tmp1.pre_sales_counts IS NULL THEN 0 ELSE tmp1.pre_sales_counts END AS pscount, CASE WHEN tmp2.implement_counts IS NULL THEN 0 ELSE tmp2.implement_counts END AS ircount, CASE WHEN tmp1.pre_sales_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp1.pre_sales_times)/3600 ELSE 0 END AS pstime, CASE WHEN tmp2.implement_times IS NOT NULL THEN EXTRACT(EPOCH FROM tmp2.implement_times)/3600 ELSE 0 END AS irtime, CASE WHEN tmp3.points IS NOT NULL THEN tmp3.points ELSE 0 END AS points, CASE WHEN tmp4.work_times IS NOT NULL THEN tmp4.work_times ELSE '00:00:00'::interval END AS work_time, CASE WHEN tmp4.work_count IS NOT NULL THEN tmp4.work_count ELSE 0 END AS work_count, CASE WHEN tmp5.reimbursement_amount IS NOT NULL THEN tmp5.reimbursement_amount ELSE 0 END AS reimbursement_amount, p.*, p.budget * profit_pct / 100 AS profits, p.budget - p.collected AS un_collected FROM "a57be577deb434"."tbl_projects" "p" LEFT JOIN (SELECT sub1.project_id, count(sub1.id) as pre_sales_counts, sum(sub1.pre_sales_time) as pre_sales_times FROM (SELECT "ps"."id", "c"."project_id", (ps.end_at - ps.start_at) as pre_sales_time FROM "a57be577deb434"."tbl_pre_sales" "ps" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ps.case_id = c.id WHERE "ps"."is_draft"=FALSE) "sub1" GROUP BY "sub1"."project_id") "tmp1" ON tmp1.project_id = p.id LEFT JOIN (SELECT sub2.project_id, count(sub2.id) as implement_counts, sum(sub2.implement_time) as implement_times FROM (SELECT "ir"."id", "c"."project_id", (ir.left_at - ir.arrived_at) as implement_time FROM "a57be577deb434"."tbl_implement_records" "ir" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON ir.case_id = c.id WHERE "ir"."is_draft"=FALSE) "sub2" GROUP BY "sub2"."project_id") "tmp2" ON tmp2.project_id = p.id LEFT JOIN (SELECT sub3.project_id, sum(sub3.points) as points FROM (SELECT "c"."project_id", sum(ca.points) as points FROM "a57be577deb434"."tbl_cases" "c" LEFT JOIN "a57be577deb434"."tbl_case_assignments" "ca" ON ca.case_id = c.id GROUP BY "c"."id") "sub3" GROUP BY "sub3"."project_id") "tmp3" ON tmp3.project_id = p.id LEFT JOIN (SELECT sub4.project_id, count(sub4.id) as work_count, sum(sub4.work_time) as work_times FROM (SELECT "wl"."id", "wl"."project_id", (wl.end_at - wl.start_at) as work_time FROM "a57be577deb434"."tbl_work_logs" "wl" WHERE ("wl"."is_draft"=FALSE) AND ("wl"."location_in_id" IS NOT NULL) AND ("wl"."location_out_id" IS NOT NULL) AND ("wl"."client_id" IS NOT NULL)) "sub4" GROUP BY "sub4"."project_id") "tmp4" ON tmp4.project_id = p.id LEFT JOIN (SELECT sub5.project_id, sum(sub5.reimbursement_amount) as reimbursement_amount FROM (SELECT "r"."project_id", "r"."amount" AS "reimbursement_amount" FROM "a57be577deb434"."tbl_reimbursements" "r" WHERE "r"."status" IN (2, 3)) "sub5" GROUP BY "sub5"."project_id") "tmp5" ON tmp5.project_id = p.id WHERE 0=1) "final" ORDER BY "bargain_date" DESC LIMIT 20

10:11:52.5283.6 msSELECTSELECT * FROM "a57be577deb434"."tbl_visit_module_histories" WHERE ("user_id"=1001) AND ("object_type"=23) AND ("visit_date"='2025-08-22')

10:11:52.5320.8 msUPDATEUPDATE "a57be577deb434"."tbl_visit_module_histories" SET "num"=4, "last_visit_at"='now()' WHERE "id"=55362

10:11:52.5331.1 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/analysis/project-list', '[]', '{"code":2000,"result":{"list":[],"count":0,"sumBudget":null,"sumProfit":0,"sumCollect":null,"pagenation":{"totalcount":0,"thispage":1,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0}', FALSE, '2025-08-22 10:11:52') RETURNING "id"