SQL for bar chart

Confluence User - 11 Dec, 2020

Hi,

I have a table with attributes of year and category.

I would like to display bar chart with x-axis displaying the year and on y-axis is total record for different category.

I have tried to use the SQL statement below but it's not working.

SELECT 
    p.c_startYear AS Year,
    p.c_projectCategory AS Category,
    COUNT(p.id) AS Total
FROM app_fd_project p
GROUP BY Year, Category


Any suggestion?

Thank you.


userviews

1


13 Dec, 2020
confluenceUser
confluenceUser

How is your query dataset looks like? Why is it not working? Can you elaborate more?

Any screenshot, dataset, and expected outcome would be good to share.

You can check out sample charts at https://marketplace.joget.org/jw/web/userview/mp/mpp/_/vad?id=APP_jtc-v1

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print