I need to come up with a SOQL Query for the code used limit, which is apporaching it's maximum. I want to identify the Classes that are using the most characters. What should I query to identify the largest Classes and get the right number of characters in them?
Not quite sure if I understand what you're asking for, but I'll give it a shot.
I believe that you're looking for the apexclass object, which can be queried via SOQL.
It ends up being a simple query
[SELECT Id, Name, LengthWithoutComments FROM ApexClass ORDER BY LengthWithoutComments DESC]
The above will give you a list of Apex Classes, as well as their size, from the largest to the smallest.
Note that triggers also contribute to the characters of code that you're allowed to have. The query for those is exactly the same, you just need to replace 'ApexClass' with 'ApexTrigger' (link to ApexTrigger docs)