Add aggregate SQL