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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -