Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Count()


Guest Hdn
 Share

Question

4 answers to this question

Recommended Posts

  • 0

Ora...

Quantos produtos tenho no estoque com a unidade "UN "... e quantos com a unidade "PAR"?

select sum(IF(unidade="UN ",1,0)) quantos_com_un,
       sum(if(unidade="PAR",1,0)) quantos_com_par
from `acme`.`estoque`

Ok?

Numa só query!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Forum Statistics

    • Total Topics
      150.1k
    • Total Posts
      647.1k
×
×
  • Create New...