I have a table named x, the table has an id column and a retry status column. The identifier can store the same values ββeven from 6 of them, while the repeat status increases each time you insert the identifier 1,2 ... n. If a new identifier is inserted, the retry status starts at 1, for example,
xid repeat_status xx123 1 xx123 1 xx123 2 xx123 3 xx123 3 xxx45 1 xxx45 2 xxx45 2
How can I modify the query below to return something like this:
xid repeat_status xx123 1 xx123 2 xx123 3 xxx45 1 xxx45 2 SELECT xid ,repeat_status FROM x GROUP BY repeat_status;
Alpha source share