Can anyone explain me what does IF(transactions.retail_cost > 0,1,0) means from the below query ?
$query = Distributors::selectRaw("distributors.name,distributors.group_id,distributors.pay,SUM(IF(transactions.retail_cost > 0,1,0)) AS trans_number");
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2AIb9k3
via IFTTT
Aucun commentaire:
Enregistrer un commentaire