I am using external SQL data on one of my pages but I’d like to change that to using the internal Bubble database. The issue is that on my page, I present data in a particular order, using Item #1, Item #2, etc. I can do this because in the SQL statement I have the query option “Order by field” to retrieve the data fields in that particular order.
I also have the option to sum the fields as they’re retrieved.
How can I achieve the same thing using a Bubble database?
This is an example of the formula from one of the fields retrieved:
This is the SQL query named “get_totals” that is used in the field above:
SELECT Category, sum(Total) FROM db_OE-Bubble
.Operating Statements
Where PropertyName = ?
Group by Category
Order by field(Category, ‘Gross Potential Rent’, ‘Loss to Lease’, ‘Losses to Vacancy’, ‘Losses to Concessions’, ‘Collection Losses’,
‘Total Rental Income’, ‘Other Revenue’, ‘Total Revenue’, ‘Taxes’, ‘Insurance’, ‘Repair and Maintenance’, ‘Administrative’,
‘Management Fees’, ‘Marketing’, ‘Utilities’, ‘Contract Services’, ‘Salaries and Personnel’, ‘Total Operating Expenses’, ‘Net Operating Income’)
limit 100;