11.01.2020 Views

BDGeo - Linguagem SQL - Consultando Dados II

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Contando os Registros

Exemplo 3: Exibir quantos funcionários tem email.

SELECT COUNT(*) AS quantidade

FROM funcionario

WHERE email IS NOT NULL

SELECT COUNT(email) AS quantidade

FROM funcionario

Exemplo 4: Exibir quantos vendedores já atenderam pedido.

SELECT COUNT(DISTINCT vendedor) AS quantidade

FROM pedido

Linguagem SQL - Consultando Dados II 11/01/2020 4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!