Skip to content

Commit

Permalink
feat: add order descending on fetch job count per category (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedAmrNabil authored Dec 22, 2024
1 parent 5496bca commit 68153e4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export async function getStatistics(req: Request, res: Response) {
`SELECT c.name, COUNT(j.id) as jobs_count
FROM jobs j
LEFT JOIN categories c ON c.id = j.category_id
GROUP BY c.name`,
GROUP BY c.name
ORDER BY jobs_count DESC`,
);

const paymentsPerMonthQuery = await db.query(
Expand Down

0 comments on commit 68153e4

Please sign in to comment.