Open
Description
const SQLBuilder = require('json-sql-builder2');
// create a new instance of the SQLBuilder and load the language extension for mysql
var sql = new SQLBuilder('MySQL');
// lets start some query fun
var totalSalary = sql.$select({
job_title: true,
total_salary: { $sum: 'salary' },
$from: 'people',
$where: {
job_title: { $in: ['Sales Manager', 'Account Manager'] },
age: { $gte: 18 },
country_code: 'US',
},
$groupBy: 'job_title',
});
comma missing in total_salary line
Metadata
Metadata
Assignees
Labels
No labels