I want to find the average of fs_lbs_per_hr for the month and the totals for the other column for the month. when I try
Posted: Tue Apr 12, 2022 10:19 am
I want to find the average of fs_lbs_per_hr for the month
and the totals for the other column for the month. when I try to do
it by month it still shows the days. for example, for dates there
should only be one 2022-03-01.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 SELECT fs_pallets_per_hr fs_lbs_per_hr fs_pallets_received fs_pounds_received fs_labor_hours --, date ,date_trunc( 'month', date)::timestamp as dateFY ,date_trunc( 'month', date)::date as date_full from dev.warehouse_metrics --WHERE date = CURRENT_DATE WHERE date BETWEEN {{moment(overallDatePicker.startValue).format("YYYY-MM-DD")}} and {{moment(overallDatePicker.endValue).format("YYYY-MM-DD")}} GROUP BY datefy --date fs_pallets_per_hr ,fs_lbs_per_hr fs_pallets_received ,fs-pounds_received fs_labor_hours ORDER BY datefy DESC 1 .
Query ran successfully. fs_lbs_per_hr | fs_pallets_re... | fs_pounds_r... | fs_labor_hou... | datefy | date_full | 0.409482758... 95 387647 232 2022-04-01T... 2022-04-01 0.829365079... 209 305484 252 2022-03-011... 2022-03-01 0.512295081... 125 343402 244 2022-03-01T... 2022-03-01 0.717948717... 168 489659 234 2022-03-01T... 2022-03-01 0.155172413... 36 175007 232 2022-03-01T... 2022-03-01 0.33203125 85 291087 256 2022-03-01T... 2022-03-01
and the totals for the other column for the month. when I try to do
it by month it still shows the days. for example, for dates there
should only be one 2022-03-01.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 SELECT fs_pallets_per_hr fs_lbs_per_hr fs_pallets_received fs_pounds_received fs_labor_hours --, date ,date_trunc( 'month', date)::timestamp as dateFY ,date_trunc( 'month', date)::date as date_full from dev.warehouse_metrics --WHERE date = CURRENT_DATE WHERE date BETWEEN {{moment(overallDatePicker.startValue).format("YYYY-MM-DD")}} and {{moment(overallDatePicker.endValue).format("YYYY-MM-DD")}} GROUP BY datefy --date fs_pallets_per_hr ,fs_lbs_per_hr fs_pallets_received ,fs-pounds_received fs_labor_hours ORDER BY datefy DESC 1 .
Query ran successfully. fs_lbs_per_hr | fs_pallets_re... | fs_pounds_r... | fs_labor_hou... | datefy | date_full | 0.409482758... 95 387647 232 2022-04-01T... 2022-04-01 0.829365079... 209 305484 252 2022-03-011... 2022-03-01 0.512295081... 125 343402 244 2022-03-01T... 2022-03-01 0.717948717... 168 489659 234 2022-03-01T... 2022-03-01 0.155172413... 36 175007 232 2022-03-01T... 2022-03-01 0.33203125 85 291087 256 2022-03-01T... 2022-03-01