Posts by Luis V. • 1 point
2 posts
-
0
votes1
answer85
viewsA: Merge select to totalize results
A general rule of response: You can turn the result of any select into a "virtual table" and make an operation on it. Don’t forget the T1 down there. In your case: select sum('QTD PEDIDO') from (…
-
0
votes4
answers3265
viewsA: Select only 1st row of table
I think there is a conceptual error in your query. The dt_entorc_oficina field is in gtoup by and min() at the same time, which is very strange. Assuming you put min() to try to bring a single…