Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Allow use of Group By without calculations #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sequel/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ SelectBuilder.prototype.processAggregates = function processAggregates(criteria)
return false;
}

// Error if groupBy is used and no calculations are given
if(!criteria.sum && !criteria.average && !criteria.min && !criteria.max) {
throw new Error('An aggregation was used but no calculations were given');
}


var query = 'SELECT ';
var tableName = utils.escapeName(this.currentTable, this.escapeCharacter);

Expand Down