Guest User

Untitled

a guest
Jul 16th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. ->select(DB::Raw('IFNULL(upm2.meta_value,(CASE WHEN UserSubscription.subscription_plan = "MASHVISOR_PRO_AGENT" THEN 2
  2. WHEN UserSubscription.subscription_plan = "MASHVISOR_EXPERT_AGENT" THEN 3
  3. WHEN UserSubscription.subscription_plan = "MASHVISOR_TOP_AGENT" THEN 4
  4. ELSE upm2.meta_value
  5. END)) - COUNT(distinct AL1.id) AS remainingLeads'))
  6.  
  7. ->having(DB::raw('`remainingLeads`'), $comp , $remainingLeads ? $remainingLeads : -9999 ))
Add Comment
Please, Sign In to add comment