# Attempting to create Monthly Leaderboard query - head exploding

**URL:** <https://meta.discourse.org/t/attempting-to-create-monthly-leaderboard-query-head-exploding/86679>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [May 3, 2018, 1:37pm UTC](https://meta.discourse.org/t/attempting-to-create-monthly-leaderboard-query-head-exploding/86679 "2018-05-03T13:37:18Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [August 27, 2018, 3:09pm UTC](https://meta.discourse.org/t/attempting-to-create-monthly-leaderboard-query-head-exploding/86679/11 "2018-08-27T15:09:47Z")

</div>

It is not a weird error, the code has a Syntax Error. Maybe you can see the issue better this way?

```plaintext
( 
   (coalesce(likes_received,0) * 2) 
 + (coalesce(replies,0) * 1) 
 + (coalesce(badges1,0) * 3)
) 
 + (coalesce(badges2,0) * 2)
) 
 + (coalesce(badges3,0) * 1)
) as total_points

```

---

_[View the full topic](https://meta.discourse.org/t/attempting-to-create-monthly-leaderboard-query-head-exploding/86679)._
