TheTallBloke
New Member
- Joined
- Sep 3, 2015
- Messages
- 30
Hi all,
I've got a list of products that I need to build a compatible accessory list, based on sizing (windows in size X are compatible with flashings in size X, for this example) and have no idea how to do so, unfortunately.
These are 1-way links (main product works with its accessory, but I do not want to link back from the latter to the former).
My mental rule for building the links is: all windows in a size are compatible with all flashings in the same size.
Sample data below, ordered by size. This is a small subset of the data I have to work with.
The output needs the main product and each accessory on a separate row.
For the first 12 rows of the above sample dataset, the output should look like this:
Many thanks in advance!
I've got a list of products that I need to build a compatible accessory list, based on sizing (windows in size X are compatible with flashings in size X, for this example) and have no idea how to do so, unfortunately.
These are 1-way links (main product works with its accessory, but I do not want to link back from the latter to the former).
My mental rule for building the links is: all windows in a size are compatible with all flashings in the same size.
Sample data below, ordered by size. This is a small subset of the data I have to work with.
sku | family | size | product_name-ecommerce |
06194 | roof_window | 1178x1140 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06152 | roof_window | 1178x1140 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06164 | roof_window | 1178x1140 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06175 | roof_window | 1178x1140 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06183 | roof_window | 1178x1140 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06205 | roof_window | 1178x1140 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06217 | roof_window | 1178x1140 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06323 | roof_window_flashing | 1178x1140 | VELUX Standard Slate Flashing |
06335 | roof_window_flashing | 1178x1140 | VELUX Standard Tile Flashing |
06347 | roof_window_flashing | 1178x1140 | VELUX Standard Plain Tile Flashing |
06363 | roof_window_flashing | 1178x1140 | VELUX Recessed Slate Flashing |
06375 | roof_window_flashing | 1178x1140 | VELUX Recessed Tile Flashing |
06350 | roof_window | 1178x1837 | VELUX 3-in-1 Roof Window, White Paint, 66 Pane |
06351 | roof_window | 1178x1837 | VELUX 3-in-1 Roof Window, White Paint, 70 Pane |
06352 | roof_window_flashing | 1178x1837 | Flashing for VELUX 3-in-1 Roof Window, slate |
06353 | roof_window_flashing | 1178x1837 | Flashing for VELUX 3-in-1 Roof Window, tiles |
06187 | roof_window | 1178x550 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06145 | roof_window | 1178x550 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06157 | roof_window | 1178x550 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06168 | roof_window | 1178x550 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06198 | roof_window | 1178x550 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06210 | roof_window | 1178x550 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06221 | roof_window | 1178x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06227 | roof_window | 1178x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06233 | roof_window | 1178x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06239 | roof_window | 1178x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06316 | roof_window_flashing | 1178x550 | VELUX Standard Slate Flashing |
06328 | roof_window_flashing | 1178x550 | VELUX Standard Tile Flashing |
06340 | roof_window_flashing | 1178x550 | VELUX Standard Plain Tile Flashing |
06356 | roof_window_flashing | 1178x550 | VELUX Recessed Slate Flashing |
06368 | roof_window_flashing | 1178x550 | VELUX Recessed Tile Flashing |
06188 | roof_window | 1178x660 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06146 | roof_window | 1178x660 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06158 | roof_window | 1178x660 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06169 | roof_window | 1178x660 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06177 | roof_window | 1178x660 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06199 | roof_window | 1178x660 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06211 | roof_window | 1178x660 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06222 | roof_window | 1178x660 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06228 | roof_window | 1178x660 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06234 | roof_window | 1178x660 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06240 | roof_window | 1178x660 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06317 | roof_window_flashing | 1178x660 | VELUX Standard Slate Flashing |
06329 | roof_window_flashing | 1178x660 | VELUX Standard Tile Flashing |
06341 | roof_window_flashing | 1178x660 | VELUX Standard Plain Tile Flashing |
06357 | roof_window_flashing | 1178x660 | VELUX Recessed Slate Flashing |
06369 | roof_window_flashing | 1178x660 | VELUX Recessed Tile Flashing |
06190 | roof_window | 1178x780 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06148 | roof_window | 1178x780 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06160 | roof_window | 1178x780 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06171 | roof_window | 1178x780 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06179 | roof_window | 1178x780 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06201 | roof_window | 1178x780 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06213 | roof_window | 1178x780 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06223 | roof_window | 1178x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06229 | roof_window | 1178x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06235 | roof_window | 1178x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06241 | roof_window | 1178x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06319 | roof_window_flashing | 1178x780 | VELUX Standard Slate Flashing |
06331 | roof_window_flashing | 1178x780 | VELUX Standard Tile Flashing |
06343 | roof_window_flashing | 1178x780 | VELUX Standard Plain Tile Flashing |
06359 | roof_window_flashing | 1178x780 | VELUX Recessed Slate Flashing |
06371 | roof_window_flashing | 1178x780 | VELUX Recessed Tile Flashing |
06181 | roof_window | 1178x942 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06184 | roof_window | 1398x1140 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06196 | roof_window | 1398x1340 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06154 | roof_window | 1398x1340 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06166 | roof_window | 1398x1340 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06176 | roof_window | 1398x1340 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06207 | roof_window | 1398x1340 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06219 | roof_window | 1398x1340 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06325 | roof_window_flashing | 1398x1340 | VELUX Standard Slate Flashing |
06337 | roof_window_flashing | 1398x1340 | VELUX Standard Tile Flashing |
06349 | roof_window_flashing | 1398x1340 | VELUX Standard Plain Tile Flashing |
06365 | roof_window_flashing | 1398x1340 | VELUX Recessed Slate Flashing |
06377 | roof_window_flashing | 1398x1340 | VELUX Recessed Tile Flashing |
06178 | roof_window | 1398x660 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06191 | roof_window | 1398x780 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06149 | roof_window | 1398x780 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06161 | roof_window | 1398x780 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06172 | roof_window | 1398x780 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06180 | roof_window | 1398x780 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06202 | roof_window | 1398x780 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06214 | roof_window | 1398x780 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06224 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06230 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06236 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06242 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06244 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Top-hung, Manual operation |
06245 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Top-hung, Manual operation |
06246 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Top-hung, Manual operation |
06247 | roof_window | 1398x780 | VELUX White Painted Conservation Roof Window, Top-hung, Manual operation |
06320 | roof_window_flashing | 1398x780 | VELUX Standard Slate Flashing |
06332 | roof_window_flashing | 1398x780 | VELUX Standard Tile Flashing |
06344 | roof_window_flashing | 1398x780 | VELUX Standard Plain Tile Flashing |
06360 | roof_window_flashing | 1398x780 | VELUX Recessed Slate Flashing |
06372 | roof_window_flashing | 1398x780 | VELUX Recessed Tile Flashing |
06192 | roof_window | 1398x942 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06150 | roof_window | 1398x942 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06162 | roof_window | 1398x942 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06173 | roof_window | 1398x942 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06182 | roof_window | 1398x942 | VELUX INTEGRA® White Polyurethane, Top-hung roof window, Electric operation, standard glazing |
06203 | roof_window | 1398x942 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06215 | roof_window | 1398x942 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06321 | roof_window_flashing | 1398x942 | VELUX Standard Slate Flashing |
06333 | roof_window_flashing | 1398x942 | VELUX Standard Tile Flashing |
06345 | roof_window_flashing | 1398x942 | VELUX Standard Plain Tile Flashing |
06361 | roof_window_flashing | 1398x942 | VELUX Recessed Slate Flashing |
06373 | roof_window_flashing | 1398x942 | VELUX Recessed Tile Flashing |
06193 | roof_window | 1600x942 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06151 | roof_window | 1600x942 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06163 | roof_window | 1600x942 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06174 | roof_window | 1600x942 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06204 | roof_window | 1600x942 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06216 | roof_window | 1600x942 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06322 | roof_window_flashing | 1600x942 | VELUX Standard Slate Flashing |
06334 | roof_window_flashing | 1600x942 | VELUX Standard Tile Flashing |
06346 | roof_window_flashing | 1600x942 | VELUX Standard Plain Tile Flashing |
06362 | roof_window_flashing | 1600x942 | VELUX Recessed Slate Flashing |
06374 | roof_window_flashing | 1600x942 | VELUX Recessed Tile Flashing |
06185 | roof_window | 698x550 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06143 | roof_window | 698x550 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06155 | roof_window | 698x550 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06208 | roof_window | 698x550 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06314 | roof_window_flashing | 698x550 | VELUX Standard Slate Flashing |
06326 | roof_window_flashing | 698x550 | VELUX Standard Tile Flashing |
06338 | roof_window_flashing | 698x550 | VELUX Standard Plain Tile Flashing |
06354 | roof_window_flashing | 698x550 | VELUX Recessed Slate Flashing |
06366 | roof_window_flashing | 698x550 | VELUX Recessed Tile Flashing |
06195 | roof_window | 978x1340 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06153 | roof_window | 978x1340 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06165 | roof_window | 978x1340 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06206 | roof_window | 978x1340 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06218 | roof_window | 978x1340 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06225 | roof_window | 978x1340 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06231 | roof_window | 978x1340 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06237 | roof_window | 978x1340 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06243 | roof_window | 978x1340 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06324 | roof_window_flashing | 978x1340 | VELUX Standard Slate Flashing |
06336 | roof_window_flashing | 978x1340 | VELUX Standard Tile Flashing |
06348 | roof_window_flashing | 978x1340 | VELUX Standard Plain Tile Flashing |
06364 | roof_window_flashing | 978x1340 | VELUX Recessed Slate Flashing |
06376 | roof_window_flashing | 978x1340 | VELUX Recessed Tile Flashing |
06186 | roof_window | 978x550 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06144 | roof_window | 978x550 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06156 | roof_window | 978x550 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06167 | roof_window | 978x550 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06197 | roof_window | 978x550 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06209 | roof_window | 978x550 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06220 | roof_window | 978x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06226 | roof_window | 978x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06232 | roof_window | 978x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06238 | roof_window | 978x550 | VELUX White Painted Conservation Roof Window, Centre pivot, Manual operation |
06315 | roof_window_flashing | 978x550 | VELUX Standard Slate Flashing |
06327 | roof_window_flashing | 978x550 | VELUX Standard Tile Flashing |
06339 | roof_window_flashing | 978x550 | VELUX Standard Plain Tile Flashing |
06355 | roof_window_flashing | 978x550 | VELUX Recessed Slate Flashing |
06367 | roof_window_flashing | 978x550 | VELUX Recessed Tile Flashing |
06189 | roof_window | 978x780 | VELUX White Painted Centre-pivot roof window, Manual operation, standard glazing |
06147 | roof_window | 978x780 | VELUX White Polyurethane Centre-pivot roof window, Manual operation, standard glazing |
06159 | roof_window | 978x780 | VELUX INTEGRA® White Polyurethane Centre-pivot roof window, Electric operation, standard glazing |
06170 | roof_window | 978x780 | VELUX White Polyurethane, Top-hung roof window, Manual operation, standard glazing |
06200 | roof_window | 978x780 | VELUX White Painted, Top-hung roof window, Manual operation, standard glazing |
06212 | roof_window | 978x780 | VELUX Lacquered Pine Centre-pivot roof window, Manual operation, standard glazing |
06318 | roof_window_flashing | 978x780 | VELUX Standard Slate Flashing |
06330 | roof_window_flashing | 978x780 | VELUX Standard Tile Flashing |
06342 | roof_window_flashing | 978x780 | VELUX Standard Plain Tile Flashing |
06358 | roof_window_flashing | 978x780 | VELUX Recessed Slate Flashing |
06370 | roof_window_flashing | 978x780 | VELUX Recessed Tile Flashing |
The output needs the main product and each accessory on a separate row.
For the first 12 rows of the above sample dataset, the output should look like this:
main product | accessory |
06194 | 06323 |
06194 | 06335 |
06194 | 06347 |
06194 | 06363 |
06194 | 06375 |
06152 | 06323 |
06152 | 06335 |
06152 | 06347 |
06152 | 06363 |
06152 | 06375 |
06164 | 06323 |
06164 | 06335 |
06164 | 06347 |
06164 | 06363 |
06164 | 06375 |
06175 | 06323 |
06175 | 06335 |
06175 | 06347 |
06175 | 06363 |
06175 | 06375 |
06183 | 06323 |
06183 | 06335 |
06183 | 06347 |
06183 | 06363 |
06183 | 06375 |
06205 | 06323 |
06205 | 06335 |
06205 | 06347 |
06205 | 06363 |
06205 | 06375 |
06217 | 06323 |
06217 | 06335 |
06217 | 06347 |
06217 | 06363 |
06217 | 06375 |
Many thanks in advance!