Query conditional amounts from db

I have a table with ā€œamountā€ column (Balances for example)
Amounts are stored in Wei (strings).

Iā€™m quering my table with aggregate(pipeline) method.

I need to filter all records where ā€œamountā€ >= N (also Wei string)

for now, options like $gte, $lte are executed with strings and not numbersā€¦

How can I achieve that filtering?

you can try the beta version that uses decimals too for some columns: Moralis Nitro Beta Testing

wow, cool ))) new version is coming )))
thanks, Iā€™ll try it
but in current version is there are any options for that?

I donā€™t know of a way to do it in current version, only to convert it in cloud code to BigNumber and do the processing there

or do some kind of custom comparison on strings, if length is bigger then is bigger, if length is lower then is lower, then compare first character

in the current version - there is no way :slight_smile:
its only strings

in beta - we solved it!

Thanks for reply! Iā€™ll check it.
Iā€™m already trying new beta version )))

Iā€™m trying to execute the same code on beta version,
but have another issue (probably a bug):
{ā€œmessageā€:ā€œNo provider found for chain 0x61ā€,ā€œcodeā€:141}

also, where can I find the link to discord (it may be useful)?

for discord, you can also find the link in the admin interface: https://discord.gg/jVRHxCkgEc

what are the steps to reproduce that error with: {ā€œmessageā€:ā€œNo provider found for chain 0x61ā€,ā€œcodeā€:141}?