I have a column type CLOB that stores an array of objects containing the following structure: {“id”: number, “name”: string} Then suppose we have the following column of CLOB records: [{“id”: 21, “nombre”: “fisica”}, {“id”: 16, “nombre”: “auditiva”}] [{“id”: 16, “nombre”: “auditiva”}] [{“id”: 4, “nombre”: “intelectual”}, {“id”: 21, “nombre”: “fisica”}] and so several records that its array in the CLOB
Tag: querying
How to sum the amount and merge the offers in a single row?
I have table with discount transactions data as below: TransactionID DiscountAmount DiscountOffer S011-T012 50 Jun-21 S011-T012 25 ManagerDisc S011-T025 15 Jul-21 I need to create a table in a way that for a single transaction, Discount amount is summed up and Discount offer is shown side-by-side (maybe with a delimiter between them). For example: TransactionID DiscountAmount DiscountOffer S011-T012 75 Jun-21
How to combine these two queries from different tables into one to calculate percentage?
I have the following query which has the students attendance in the period: And I have the lesson count in the same period. I’d like to divide total_presences by lessons count to get the students attendance percentage. How do I do that in a single query? Answer Probably the easiest way is to use a CTE: Depending on the type