But now I don't know how to use this lines to generate queries using date, place as parameters to insert and fill cells.
Maybe I'm doing it wrong because finally I'm starrting from the final format I want instead of starting to retrieve all data and merge/filter/order them with another formatted table to generate the wanted Excel. But I don't really know how to that too
It seems to have to deal with normalization/denormalization but I don't know how to deal with ordering column and agreggating multiple lines with different ordered columns