Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Query] More Detail on the Program Page #56

Open
jbaldo opened this issue Jan 25, 2017 · 1 comment
Open

[Query] More Detail on the Program Page #56

jbaldo opened this issue Jan 25, 2017 · 1 comment

Comments

@jbaldo
Copy link
Member

jbaldo commented Jan 25, 2017

mockup

@jbaldo
Copy link
Member Author

jbaldo commented Jan 25, 2017

SELECT SUM(mga.ytd_actual) ytd, prog.short, mga.year 
FROM measure_g_actuals mga  
JOIN programs prog ON mga.program_id = prog.id 
WHERE mga.year in (SELECT DISTINCT m.year FROM measure_g_actuals m ORDER BY m.year DESC limit 2) GROUP BY prog.short, mga.year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant