Select ...

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Sun, 03 Jun 2007 11:50 pm

Guys, I have the following table \"vendor\" cod_vendedor (PK) dat_matricula com_vend cod_regiao clas_vend sal_vend name I need a select to return to the vendor class, the media of wages, lower wages, higher salary and total wages for class!

Help Me Please!
Mr.Paulo
Location: Barretos-SP

Poston Mon, 04 Jun 2007 8:39 am

Say brother, beleza?

An adaptation of this code below on your table, and see if it helps:
Code: Select all
SELECT classe_nf classe,
       SUM(vlr_nf) total,
       MIN(vlr_nf) menor,
       MAX(vlr_nf) maior,
       AVG(vlr_nf) media
  FROM tb_teste
GROUP BY classe_nf
ORDER BY classe_nf
qualquer thing, says ai.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Mon, 04 Jun 2007 6:48 pm

It Worked Man. ..!!!

Thank you!!!
Mr.Paulo
Location: Barretos-SP



Return to SQL

Who is online

Users browsing this forum: No registered users and 2 guests