SQL JOIN AND GROUP BY -


i pulling data 5 columns there 2 joins , need group 1 of columns. i'm getting error when try group @ end. need sort of sub query?

select      territory_t.territoryid,      territory_t.territoryname,      customer_t.customerid,      order_t.orderid,      product_t.productid      territory_t,      customer_t,      order_t,      product_t,      doesbusinessin_t       territory_t.territoryid = doesbusinessin_t.territoryid     , customer_t.customerid = doesbusinessin_t.customerid group      orderid order      territoryid desc,      customerid 

the customer table , orders table both have customerid. need query on them first, use group by, , join other tables?


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -