There is an exact question like this for SQL server but I'm using Postgres 9.3 and the ','
didn't work
I am making a comparison between 2 separate years. e.g. 2016 and 2015
I check the user if he received any bad grades with same subjects over a course of 2 years.
My code goes as follows
with currentyeargrade (
select ....
from (...
...)t)
with previousyeargrade(
select ....
from (...
...)y)
select *
from currentyeargrade cyg
inner join previousyeargrade pvg on pvg.userid = cyg.userid
I am an SQL developer and I do not have admin privileges to create a temp table.