I'm a student doing a project and I have to use SQLite however i'm new to SQLite. I have described my problem below.
I have a table(containing 60000 rows) which is of the form shown below.
Date_Time Country_City Temperature
4-10-2012 12:10:10 USA_NYC 20
4-10-2012 12:10:10 USA_LA 17
4-10-2012 12:10:10 USA_DC 19
4-10-2012 12:40:10 USA_LA 18
4-10-2012 12:40:10 USA_DC 18
I have to sort and create the table as shown below, if the data is missing as in NYC the previous data must be loaded if not 'NaN'.
Date_Time USA_NYC USA_LA USA_DC
4-10-2012 12:10:10 20 17 19
4-10-2012 12:40:10 20 18 18
Can you please tell me how to create it, I could order and sort, but I do not know how to create like this in SQLite. I would be grateful for any suggestions.