I have a database that trim and list the engine for each and the model is per model model, and trim it & Lists; To make the engine & amp; Models in each row I want to compress and output this data into the CSV spreadsheet so that every A & A. The model is in one line, trim and engine data has been compressed in each column. The database is currently in SQL, so I can either do this server side (eg, PHP and then output to a CSV format) or I can output data in a CSV format and Can manipulate data on my computer (for example, if it is possible to use Excel, or maybe anything else). There are approximately 50,000 lines that I guess will be compressed down to approximately 8000 I want to take this. Trim: Engine: Year: Chevrolet Impala Lok Sabha 2.5L 2015 Chevrolet Impala Lok Sabha 3.6L 2015 Chevrolet Impala LT 2.5L 2015 Chevrolet Impala LT 3.6L 2015 Chevrolet Impala LTZ 2.5 L 2015 Chevrolet Impala LTZ 3.6L 2015 Chevrolet Malibu Lokmata 2.5L 2015 Chevrolet Malibu LT 2.0 L 2015 Chevrolet Malibu LTL 2.5L 2015 Chevrolet Malibu LTZ 2.0L 2015 Chevrolet Malibu LTZ 2.5L 2015 Chevrolet Silverado 1500 High Country 5.3L 2015 Chevrolet Silverado 1500 High Country 6.2L 2015 Chevrolet Silverado 1500 LT 4.3L 2015 Shay Rocket Silverado 1500 LT 5.3L 2015 Chevrolet Silverado 1500 LTZ 5.3L 2015 Chevrolet Silverado 1500 LTZ 6.2L 2015 Chevrolet Silverado 1500 WT 4.3L 2015 Chevrolet Silverado 1500 WT 5.3L 2015 More Collapse it in unique lines: Thank you very much!
Unique Vehicles: Unique Trims: Unique Engines: Year: Chevrolet Ipala LS, LT, LTZ 2.5 L, 3.6 L 2015 Chevrolet Malibu LS, LT , LTZ 2.0 L, 2.5 L 2015 Chevrolet Silverwood 1500 High Country, LT, LTZ, WT 4.3 L, 5.3 L, 6.2 L 2015
Monday, 15 February 2010
php - How can I compress this list of data into one field? -
After
Assume that you are using MySQL (if you do not specify), Then you can use the Function
Select Vehicle, GROUP_CONCAT (Trim different trim command) AS unique_trims, GROUP_CONCAT (engine order specified by engine) as unique_gigans, vehicle-to-vehicle year, year vehicle Year by year,
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment