Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. select
  2. company_name,
  3. count(distinct job_ads.id) as jumlah_job_ads,
  4. COUNT(DISTINCT applications.id) as applikasi,
  5. type,
  6. total_ads_id
  7. from
  8. employer
  9. left join
  10. job_ads ON job_ads.employer_id = employer.id
  11. and job_ads.is_active = 1
  12. and job_ads.review_status = 'a'
  13. left join
  14. company ON employer.company_id = company.id
  15. left join
  16. company_external_ads ON company_external_ads.company_id = company.id
  17. left join
  18. applications ON applications.job_ads_id = job_ads.id
  19. where
  20. type like 'jobstreet'
  21. and total_ads_id > 0
  22. group by employer.id
  23. having count(Distinct job_ads.id) > 0
  24. and COUNT(DISTINCT applications.id) < 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement