Конструктор для девочек : 3 года, 7 лет, 12 лет, электронные, развивающие, наборы, космос, трансформеры
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: LEGO (Дания)
SELECT url_to, r404
FROM pod_redirect
WHERE BINARY REPLACE(url_from,'/ru/','/') = '/konstruktor_dlya_devochek/o_3-o_7-o_12-electronic-developing-constructor_sets-space-transformery.html' LIMIT 0,1 [0.0015368461608887 sec]
SELECT pod_filter.id,pod_filter.url FROM pod_filter WHERE BINARY pod_filter.url IN ('o_3','o_7','o_12','electronic','developing','constructor_sets','space','transformery') order by url [0.0018749237060547 sec]
SELECT pod_sub_icon.id,pod_sub_icon.url FROM pod_sub_icon WHERE BINARY pod_sub_icon.url IN ('o_3','o_7','o_12','electronic','developing','constructor_sets','space','transformery') order by url [0.0012531280517578 sec]
SELECT id, url FROM pod_filter WHERE url IN ('o_3','o_7','o_12','electronic','developing','constructor_sets','space','transformery') [0.0012469291687012 sec]
SELECT id, url FROM pod_sub_icon WHERE url IN ('o_3','o_7','o_12','electronic','developing','constructor_sets','space','transformery') [0.00050091743469238 sec]
SELECT f.id, mf.id as mf_id, mf.is_split
FROM pod_filter f
INNER JOIN pod_filter mf ON f.entry = mf.id
WHERE f.id in (466,463,462,373,265,365,3452,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00026321411132812 sec]
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.029407024383545 sec]
CREATE TEMPORARY TABLE temp_brand_counts_6a2a7c9927176 (
id INT,
gid INT,
INDEX idx_id (id),
INDEX idx_gid (gid)
) [0.00098180770874023 sec]
INSERT INTO temp_brand_counts_6a2a7c9927176 (id, gid)
SELECT g.brand_id AS id, g.id AS gid -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.brand_id AS id, g.id AS gid -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
[0.0032510757446289 sec]
SELECT b.id, b.name AS name, pc.name AS country, b.country_id,
b.image_icon, b.url, b.ordr, pc.code,
COALESCE(tc.count, 0) as count
FROM pod_cat_brand b
INNER JOIN (
SELECT id, COUNT(gid) as count
FROM temp_brand_counts_6a2a7c9927176
GROUP BY id
HAVING COUNT(gid) > 0
) tc ON b.id = tc.id
LEFT JOIN pod_country pc ON (pc.id = b.country_id AND pc.is_active = 1)
WHERE b.is_active = '1'
ORDER BY b.ordr [0.00064897537231445 sec]
DROP TEMPORARY TABLE IF EXISTS temp_brand_counts_6a2a7c9927176 [0.00020503997802734 sec]
SELECT MIN(min_price) AS min_price, MAX(max_price) AS max_price
FROM (
SELECT MIN(g.price) AS min_price, MAX(g.price) AS max_price -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT MIN(g.price) AS min_price, MAX(g.price) AS max_price -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT MIN(go.price) AS min_price, MAX(go.price) AS max_price -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT MIN(go.price) AS min_price, MAX(go.price) AS max_price -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A
[0.002514123916626 sec]
SELECT id, name AS name, url FROM pod_filter WHERE id in (466,463,462,373,265,365,3452,3460) AND is_active='1' [0.00036883354187012 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00048494338989258 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d (id) SELECT A.id FROM (
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0033421516418457 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00039911270141602 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (265,365,373,462,463,466,3452,3460)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 447
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 0 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.025311946868896 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00056099891662598 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d p
GROUP BY p.filter_id [0.00056600570678711 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.0005040168762207 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d [0.00036907196044922 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d [0.00013899803161621 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c992ca8d [0.00016689300537109 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9934e74;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 (
id INT NOT NULL,
entry INT NOT NULL,
PRIMARY KEY (id),
KEY idx_entry (entry)
) ENGINE=MEMORY; [0.00037002563476562 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 (id, entry) SELECT A.id, A.entry FROM (
SELECT g.id as id, g.id as entry -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id as id, g.id as entry -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT go.id as id, g.id as entry -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT go.id as id, g.id as entry -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.0037820339202881 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9934e74;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00047421455383301 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 (goods_id, filter_id)
SELECT DISTINCT
A.entry AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id_value NOT IN (265,365,373,462,463,466,3452,3460)
INNER JOIN pod_cat_filter cf ON gf.filter_id = cf.filter_id AND cf.category_id = 447
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 1 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0012931823730469 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9934e74;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00043296813964844 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 p
GROUP BY p.filter_id [0.00050187110900879 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00047588348388672 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 [0.00033712387084961 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 [0.00013089179992676 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9934e74 [0.00018596649169922 sec]
SELECT f.id, mf.id as mf_id, mf.is_split
FROM pod_filter f
INNER JOIN pod_filter mf ON f.entry = mf.id
WHERE f.id in (373,265,365,3452,3460) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00070691108703613 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00051212310791016 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (id) SELECT A.id FROM (
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.003917932510376 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.00046706199645996 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 461
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 0 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0039560794830322 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00047397613525391 sec]
INSERT INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 p
GROUP BY p.filter_id [0.0004119873046875 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 c ON c.filter_id = pf.id
WHERE pf.id in (462,463,466) AND c.filter_id IS NULL [0.00047397613525391 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00044798851013184 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 [0.00035786628723145 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 [0.00017309188842773 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c9937fd7 [0.00014686584472656 sec]
SELECT f.id, mf.id as mf_id, mf.is_split
FROM pod_filter f
INNER JOIN pod_filter mf ON f.entry = mf.id
WHERE f.id in (466,463,462,373,265,365) and f.is_active AND mf.is_active
ORDER BY mf.id, f.id [0.00064301490783691 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c993b87a;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY; [0.00041985511779785 sec]
INSERT INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (id) SELECT A.id FROM (
SELECT g.id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT g.id -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.057177066802979 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c993b87a;
CREATE TEMPORARY TABLE tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (
goods_id INT NOT NULL,
filter_id INT NOT NULL,
PRIMARY KEY (goods_id, filter_id)
) ENGINE=MEMORY; [0.0006110668182373 sec]
INSERT INTO tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (goods_id, filter_id)
SELECT DISTINCT
A.id AS goods_id,
f.id AS filter_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c993b87a A
INNER JOIN pod_good_filter gf ON A.id = gf.id_good AND gf.filter_id = 3436
INNER JOIN pod_filter fm ON gf.filter_id = fm.id AND fm.is_split = 0 AND fm.is_active
INNER JOIN pod_filter f ON gf.filter_id_value = f.id AND f.is_active [0.0057699680328369 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (
filter_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00052809715270996 sec]
INSERT INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (filter_id, count)
SELECT
p.filter_id,
COUNT(*) AS count
FROM tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c993b87a p
GROUP BY p.filter_id [0.00042200088500977 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a (filter_id, count)
SELECT pf.id, 0
FROM pod_filter pf
LEFT JOIN tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a c ON c.filter_id = pf.id
WHERE pf.id in (3452,3460) AND c.filter_id IS NULL [0.00042200088500977 sec]
SELECT
c.filter_id,
c.count,
f.entry,
f.name AS name,
f.url,
f.ord,
fm.name AS mname,
fm.url AS murl,
fm.ord AS mord
FROM tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a c
INNER JOIN pod_filter f ON c.filter_id = f.id
INNER JOIN pod_filter fm ON f.entry = fm.id
ORDER BY fm.ord DESC, f.ord DESC, c.filter_id [0.00049901008605957 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c993b87a [0.00041103363037109 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_pairs_cp6op7unairpo6lh12067309iu_6a2a7c993b87a [0.00026106834411621 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c993b87a [0.00017213821411133 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6;
CREATE TEMPORARY TABLE tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 (
entry INT NOT NULL,
sub_icon_id INT NOT NULL,
PRIMARY KEY (entry, sub_icon_id)
) ENGINE=MEMORY; [0.00034999847412109 sec]
INSERT IGNORE INTO tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 (entry, sub_icon_id)
SELECT DISTINCT A.entry, A.sub_icon_id FROM (
SELECT g.id as id, g.id as entry, g.sub_icon_id -- основні
FROM pod_cat_good g
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT g.id as id, g.id as entry, g.sub_icon_id -- основні в допкатегорії
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON g.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
g.is_present AND
g.is_present_all_mods AND g.entry =0 AND g.is_active
UNION
SELECT go.id as id, g.id as entry, go.sub_icon_id -- підтовари
FROM
pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE g.cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
UNION
SELECT go.id as id, g.id as entry, go.sub_icon_id -- підтовари в допкатегорії
FROM pod_cat_good go
INNER JOIN pod_cat_good g ON go.entry = g.id
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
INNER JOIN pod_good_filter gf0 ON go.id = gf0.id_good AND gf0.filter_id_value in (265,365,373)
INNER JOIN pod_good_filter gf1 ON g.id = gf1.id_good AND gf1.filter_id_value in (462,463,466)
INNER JOIN pod_good_filter gf2 ON g.id = gf2.id_good AND gf2.filter_id_value in (3452,3460)
WHERE dc.dop_cat_id IN (447) AND
go.is_present AND go.is_active AND g.is_present_all_mods AND g.is_active
) A [0.014673948287964 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6;
CREATE TEMPORARY TABLE tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 (
sub_icon_id INT NOT NULL PRIMARY KEY,
count INT NOT NULL
) ENGINE=MEMORY; [0.00056600570678711 sec]
INSERT IGNORE INTO tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 (sub_icon_id, count)
SELECT
sub_icon_id,
COUNT(DISTINCT entry) AS count
FROM (
SELECT A.entry, A.sub_icon_id
FROM tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 A
INNER JOIN pod_sub_icon si ON A.sub_icon_id = si.id AND si.is_active_filter = 1
) AA
GROUP BY sub_icon_id [0.00068497657775879 sec]
SELECT
c.sub_icon_id AS id,
c.count,
si.entry,
si.name AS name,
si.url
FROM tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 c
INNER JOIN pod_sub_icon si ON c.sub_icon_id = si.id AND si.is_active_filter = 1
ORDER BY si.ordr, si.name [0.00045514106750488 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_A_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 [0.00046992301940918 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_counts_cp6op7unairpo6lh12067309iu_6a2a7c994c6d6 [0.00021004676818848 sec]
DEVELOPMENT🌷СКИДКИ ДО 70%
ПЕРЕЙТИ
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: Super Wings (КНР)
Производитель: LEGO (Дания)