SQL to merge rows
问题 Update How I can select the rows from a table that when ordered the first element matches some row the second element matches the next row the third element the next row after the second row the forth element the next row after the third row and so on until the end of values in array? The Logic Supposing I have these rows as result of a query (table token holds id and word and table positioning holds id and position ): id | word | textblockid |sentence |position 5 | Fear | 5 | 1 | 1 8 | of |