sql - Howto get freq of count's data in month 1 - 12 in specific year -
How do I get a frequency of counting statistics, such as results below, I need a similar result for creating a dashboard
## Data in the year 2014 Table 1 month_name | Calculation_food month 1 0 months 2 12 months 3 15 months 4 5 months 5 6 months 6 12 months 7 9 months 50 months 0 0 month 0 months 11 months 12 0
My DB structure Like cust_name Doc_date C001 13.02.2014 C098 17.06.2014 C099 05.06.2014 I want to count it group by month. Try it:
Try it:
Select XMO, Select '01' as the MO from * (*) to Free (from RDB $ DATABASE union, select '02' RDB $ DATABASE union from 'RDB $ DATABASE union' from 'RDB $ DATABASE union' from '03' RDB $ Databas Union Select all '04' Select all '06' from RDB $ DATABASE Union Select all '06' from RDB $ DATABASE Union Select all '06' from RDB $ DATABASE union '07' All Selection RDB '$ 08' RDB from Union of Defense All the selections from the $ Database Association are '09' from the RDB $ Database Select '10' Select '11' from the RDB $ Database Select 'RDB $ Database' from '12 'x) Join X in table_1 at X.mo = substring (t.doc_date, 3, 2) where t Like the doc_date '% 2014' group by x.mo, the order
assumes the Doc_date field is stored in the DD.MY.YYYY format you have posted.
I have used a left w / an inline view that is 'seal CTS 01' through '12' so that the month with no docs will still not return (your desired output month W / shows zero)
Comments
Post a Comment