BIGINT UNSIGNED VALUE IS out of range My SQL
===

I'm getting the following error

    #1690 - BIGINT UNSIGNED value is out of range in '(`legends`.`spawns`.`quantity` - `tmp_field`)'

Here is my query

    SELECT drops.common, drops.uncommon, drops.rare, drops.legendary, spawns . * , (
    quantity - COUNT( game_moblist.spawn_id )
    ) AS quantity_to_spawn, mobs . * 
    FROM spawns
    LEFT JOIN mobs
    USING ( mob_id ) 
    LEFT JOIN game_moblist
    USING ( spawn_id ) 
    LEFT JOIN drops ON ( 
    SELECT MAX( level ) 
    FROM drops
    WHERE drops.type = mobs.drop_list
    AND drops.level <= spawns.level ) 
    GROUP BY spawn_id
    HAVING quantity_to_spawn >=0
    AND next_spawn <=0

I've been staring at it a while the query is long I'm sorry.


spawns table - count game_moblist.spawn_id is 0 for all possible rows but 1 (I deleted a row to test the query)

The data otherwise is quite long and irrelevant to my question I think

Any idea how to get around this error?