Casting SELECT statements to BigInteger then converting to long.