別のidfeedbackの行IDを取得したい
SELECT l.idfeedback_store,
@curRow := @curRow + 1 AS row_number
FROM feedback_store l
JOIN (SELECT @curRow := 0) r;
結果
idfeedback_store row_number
1 1
1 2
1 3
2 4
2 5
2 6
2 7
3 8
3 9
3 10
4 11
必要な結果
idfeedback_store row_number
1 1
1 2
1 3
2 1
2 2
2 3
2 4
3 1
3 2
3 3
4 1