i am pretty new to transact sql, i have been working in mysql
but this simple query returns the same results with or without the group by clause. i would like just one row per customerid
#########
select c.customerid, c.firstname, c.lastname, co.name, cod.custorderdetailid
from c02.customer c, c02.custorder co, c02.custorderdetail cod
where c.customerid=co.customerid and co.custorderid=cod.custorderid
and custtype=4
group by c.customerid, c.firstname, c.lastname, co.name, cod.custorderdetailid
order by c.lastname
################
but this simple query returns the same results with or without the group by clause. i would like just one row per customerid
#########
select c.customerid, c.firstname, c.lastname, co.name, cod.custorderdetailid
from c02.customer c, c02.custorder co, c02.custorderdetail cod
where c.customerid=co.customerid and co.custorderid=cod.custorderid
and custtype=4
group by c.customerid, c.firstname, c.lastname, co.name, cod.custorderdetailid
order by c.lastname
################