I am trying to filter data based on "amount" range in SQL API query WHERE condition. The amount value could be an integer value without double quotes or decimal value with double quotes. Basically I need to filter all records between two amount range values
Below is my sample data.
[
{
"customer": "001",
"dt": {
"Transaction": [
{
"Amount": "999.00",
"timestamp": "2019-01-28T15:44:49.215"
}
]
}
},
{
"customer": "002",
"dt": {
"Transaction": [
{
"Amount": "9999.00",
"timestamp": "2019-01-28T15:44:49.215"
}
]
}
},
{
"customer": "003",
"dt": {
"Transaction": [
{
"Amount": 9,
"timestamp": "2019-01-28T15:44:49.215"
}
]
}
}
]
Below is the query that I am trying to run to find records with amount between 99 and 10000
SELECT c.dt[0].Transaction[0].Amount FROM c where c.dt[0].Transaction[0].Amount>"99"
and c.dt[0].Transaction[0].Amount<"10000"
But it is not returning any records
Could you please help me with the query. I need to filter records with amount between 99 and 10000