I have an Orders table (text customer_id, int total_orders) which contains overview stats of total orders for each customer.
What I am trying to do is generate a query output that will represent a customer as a row for each third order they've made similar to this.
combined_key is used as the primary/unique key which is simply the customer_key and count combined as I cannot use an auto-number.
I know how I can identify which records I need to be in the query but I don't know how I can split the records as desired.
select * from stats where order_count / 3
I've included a fiddle, please note it's in MySQL because T-SQL is not available.