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 -

plugins - CodeIgniter support on netbeans 8.0 -

php - Selecting items from MySQL for a status update feed efficiently while accounting for possible spam -