51 | | select a.ime, a.prezime, p.cityname, count(op.ownerid) from apartment_owner ao |
52 | | join appuser as a on ao.ownerid = a.userid |
53 | | join owner_post op on ao.ownerid = op.ownerid |
54 | | join post as p on op.owner_postid = p.postid |
55 | | where extract(year from p.date_posted)=extract(year from now())-1 |
56 | | and extract(month from p.date_posted)=9 |
57 | | group by 1,2,3 |
| 51 | select extract(month from date_posted)||'/'||extract(year from date_posted) as month_and_year, count(extract(month from date_posted)) from post p |
| 52 | join owner_post op on p.postid=op.owner_postid |
| 53 | group by date_posted |