How do I find out which products are most profitable with iDBQuery?

Ask iDBQuery in plain language which products are most profitable, and it writes the SQL, joins your sales and cost data into one live model, and returns a ranked, cited table of profit by product in seconds. Every figure links straight back to its source rows.

Profitability rankings usually mean exporting sales, then hunting down unit costs, discounts and returns in a separate system and stitching them together in a spreadsheet. iDBQuery removes that grind. Point it at your order data and your cost or COGS data, then simply ask which products make the most money.

  • It builds one live model across your sales table and your cost data, even if they live in different databases or files
  • It computes revenue minus cost (and, if you ask, minus discounts, refunds and shipping) per product
  • It returns a ranked table or bar chart of gross margin by product, highest to lowest
  • Every number is a cited answer you can click to see the exact rows behind it

For example, ask *which ten products had the highest gross margin last quarter, and how does that compare to units sold?* iDBQuery will show you the winners by margin, not just by revenue, which often surprises teams who have been over-indexing on top sellers. You can immediately follow up with *now split that by region* or *which of those are we discounting the most?* without starting over.

Because iDBQuery queries your data in place and shows its work, finance can trust the ranking enough to act on it, moving spend and shelf space toward the products that actually drive profit rather than the ones that simply sell in volume.

Updated 2026-06-22