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

html - Cut text on left side inside button while centering -

java - Last square of 8x8 grid not drawn, using two nested FOR loops -

What design pattern is this code in Javascript? -