Posts by Pedro Souza • 11 points
2 posts
-
0
votes1
answer30
viewsQ: Return field different from the one inserted in the GROUP BY clause
I have the following table: | id | payment_id | user_id | device | ------------------------------------ 1 | 2 | 1 | active | ------------------------------------ 2 | 4 | 5 | not_active…
-
-1
votes1
answer45
viewsQ: Select to calculate all records and total record by one condition
I have a sales table per user, which connects user_id, product_name and sales value. I would like to make an inquiry to return how many products were sold per user and how many products with more…