skip to Main Content

Sum values of JSON array in oracle sql

I have a Table which contains data like id, country, city,capacity. Capacity is a JSON array field which has values like [{'totalCapacity':100.0},{'totalCapacity':90.0},{'totalCapacity':80.0},{'totalCapacity':80.0}] against a row in table, so row in table looks like id country city capacity 1 usa new-york…

VIEW QUESTION

Normalize nested JSON into multiple tables

I have a table where each row contain nested JSON. I want to normalize this JSON into multiple tables with data. For example below is the JSON for 1 row. { "Arn":"UNLQ5HFPVXMX7", "Merchant":"UNL", "Aun":"aad9561d-17bc-4280-a44f-7fd4cdb2c57a", "ExternalArn":"b7e6d3da-4b63-44a8-adfc-884cce34288d", "Status":"Commenced", "PageIdentifier":"ValidationResult", "ProductRate":{ "RollRate":false, "IsFromRate":false…

VIEW QUESTION

Mysql – Making a dynamic filter in a sql query

I have this code: <?php $count_item = mysql_query("SELECT * FROM stdevice JOIN stlocation ON stdevice.location = stlocation.stdev_id JOIN device_name ON stdevice.dev_id = device_name.dev_id WHERE dev_name LIKE '%$dev_name%' AND stdev_location_name LIKE '%$stdev_location_name%' AND dev_serial LIKE '%$dev_serial'"); $count = mysql_num_rows($count_item); ?> This…

VIEW QUESTION
Back To Top
Search