mysql SUM Group after max of Date -


i have 2 tables,

servis table client_id date , type (0 or 1)

sales tables client_id date , product

i need crate table groups client id, calculates sum of product, data after last date on servis table, type 1

client | sum
-------+------
1 | 32
4 | 2


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -