How to design a data table with a parent-child relationship

At present, the table structure of a question bank is designed, and one question will have subquestions, the amount of evaluation table data exceeds 10 million, SQL Server is used as storage. Question table contains question number, stem, type, explanation, answer and other attributes. what is the best way to design the schema in this… Read More How to design a data table with a parent-child relationship

Without altering the original table, how do filter and separate two different items of the same column into two different columns?

ColorBreakdown id color amount 0 red 25 0 blue 13 1 red 16 1 blue 17 Color name red blue Given the tables above, how do I separate it into the table below without altering said table? (only by selecting, joining, filtering etc.) id red blue 0 25 13 0 16 17 I am totally… Read More Without altering the original table, how do filter and separate two different items of the same column into two different columns?