Today I was given a question that I may be asked in a job interview for a IT position at a local company. I drew a blank on this seemingly simple problem and have been racking my brain.
Given:
Problem:
Take the given table and show how you would generate the following resulting table.
Basically the Batch# must be combined into a new row where the other data is the same.
I am having a brain freeze ont his one and am would love to see a simple and elegant solution to this seemingly easy problem.
Thank you in advance for any help that you may provide.
Given:
Code:
Table Old
Year Month Serial# Batch#
2007 Jan 101 MW
2007 Jan 101 TR
Take the given table and show how you would generate the following resulting table.
Code:
Table New
Year Month Serial# Batch01# Batch02# Batch03#
2007 Jan 101 MW TR null
Basically the Batch# must be combined into a new row where the other data is the same.
I am having a brain freeze ont his one and am would love to see a simple and elegant solution to this seemingly easy problem.
Thank you in advance for any help that you may provide.
Comment