2011-01-14

mysql queries..

SELECT DISTINCT ns
FROM (

SELECT ns, MAX( `sloj` ) m
FROM `w2`
GROUP BY ns
)foo
WHERE m <2041
ORDER BY `foo`.`ns` ASC

and another


select id, max(vērtība) m from tabula group by id having m <= 5

Nav komentāru:

Komentāra publicēšana