SELECT id, home, template, s.params
FROM pcpr1_template_styles as s
LEFT JOIN pcpr1_extensions as e ON e.element=s.template AND e.type='template' AND e.client_id=s.client_id
WHERE s.client_id = 0 AND e.enabled = 1

SELECT a.rules
FROM pcpr1_assets AS a
WHERE a.id = 1

SELECT b.rules
FROM pcpr1_assets AS a
LEFT JOIN pcpr1_assets AS b ON b.lft <= a.lft AND b.rgt >= a.rgt
WHERE a.name = 'com_content'
ORDER BY b.lft

SELECT c.*,CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as slug
FROM pcpr1_categories as c
LEFT JOIN pcpr1_categories AS s ON (s.lft <= c.lft AND s.rgt >= c.rgt) OR (s.lft > c.lft AND s.rgt < c.rgt)
LEFT JOIN (SELECT cat.id as id FROM pcpr1_categories AS cat JOIN pcpr1_categories AS parent ON cat.lft BETWEEN parent.lft AND parent.rgt WHERE parent.extension = 'com_content' AND parent.published != 1 GROUP BY cat.id) AS badcats ON badcats.id = c.id
WHERE (c.extension='com_content' OR c.extension='system') AND c.access IN (1,1) AND c.published = 1 AND s.id=2 AND badcats.id is null
GROUP BY c.id
ORDER BY c.lft

UPDATE pcpr1_content SET hits = hits + 1 WHERE id = 1

SELECT params FROM pcpr1_extensions AS e WHERE e.element='com_widgetkit'

SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, CASE WHEN a.modified = 0 THEN a.created ELSE a.modified END as modified, a.modified_by, uam.name as modified_by_name,CASE WHEN a.publish_up = 0 THEN a.created ELSE a.publish_up END as publish_up, a.publish_down, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured, LENGTH(a.fulltext) AS readmore ,CASE WHEN badcats.id is not null THEN 0 ELSE a.state END AS state,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email,contact.id as contactid,parent.title as parent_title, parent.id as parent_id, parent.path as parent_route, parent.alias as parent_alias,ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count as rating_count,c.published, CASE WHEN badcats.id is null THEN c.published ELSE 0 END AS parents_published
FROM pcpr1_content AS a
LEFT JOIN pcpr1_content_frontpage AS fp ON fp.content_id = a.id
LEFT JOIN pcpr1_categories AS c ON c.id = a.catid
LEFT JOIN pcpr1_users AS ua ON ua.id = a.created_by
LEFT JOIN pcpr1_users AS uam ON uam.id = a.modified_by
LEFT JOIN pcpr1_contact_details AS contact on contact.user_id = a.created_by
LEFT JOIN pcpr1_categories as parent ON parent.id = c.parent_id
LEFT JOIN pcpr1_content_rating AS v ON a.id = v.content_id
LEFT OUTER JOIN (SELECT cat.id as id FROM pcpr1_categories AS cat JOIN pcpr1_categories AS parent ON cat.lft BETWEEN parent.lft AND parent.rgt WHERE parent.extension = 'com_content' AND parent.published != 1 GROUP BY cat.id ) AS badcats ON badcats.id = c.id
WHERE a.access IN (1,1) AND CASE WHEN badcats.id is null THEN a.state ELSE 0 END = 1 AND a.catid IN (7) AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2018-12-19 10:16:46') AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2018-12-19 10:16:46')
ORDER BY a.hits DESC LIMIT 0, 3

SELECT c.*,CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as slug
FROM pcpr1_categories as c
LEFT JOIN pcpr1_categories AS s ON (s.lft <= c.lft AND s.rgt >= c.rgt) OR (s.lft > c.lft AND s.rgt < c.rgt)
LEFT JOIN (SELECT cat.id as id FROM pcpr1_categories AS cat JOIN pcpr1_categories AS parent ON cat.lft BETWEEN parent.lft AND parent.rgt WHERE parent.extension = 'com_content' AND parent.published != 1 GROUP BY cat.id) AS badcats ON badcats.id = c.id
WHERE (c.extension='com_content' OR c.extension='system') AND c.access IN (1,1) AND c.published = 1 AND s.id=7 AND badcats.id is null
GROUP BY c.id
ORDER BY c.lft

SELECT a.*, c.published AS c_published,
CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug,
DATE_FORMAT(a.date, "%Y-%m-%d") AS created,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author
FROM `pcpr1_weblinks` AS a
LEFT JOIN pcpr1_categories AS c ON c.id = a.catid
LEFT JOIN pcpr1_users AS ua ON ua.id = a.created_by
LEFT JOIN pcpr1_users AS uam ON uam.id = a.modified_by
WHERE a.access IN (1,1) AND a.catid = 6 AND c.access IN (1,1) AND c.published = 1 AND a.state = 1
ORDER BY title asc

SELECT a.*, c.published AS c_published,
CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug,
DATE_FORMAT(a.date, "%Y-%m-%d") AS created,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author
FROM `pcpr1_weblinks` AS a
LEFT JOIN pcpr1_categories AS c ON c.id = a.catid
LEFT JOIN pcpr1_users AS ua ON ua.id = a.created_by
LEFT JOIN pcpr1_users AS uam ON uam.id = a.modified_by
WHERE a.access IN (1,1) AND a.catid = 6 AND c.access IN (1,1) AND c.published = 1 AND a.state = 1
ORDER BY title asc LIMIT 0, 5

21 типов SQL-запросов зафиксировано, отсортировано по вхождениям

Запросы типа SELECT:

2 × SELECT c.*,CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as slug FROM pcpr1_categories as c LEFT JOIN pcpr1_categories AS s ON (s.lft <= c.lft AND s.rgt >= c.rgt) OR (s.lft > c.lft AND s.rgt < c.rgt) LEFT JOIN (SELECT cat.id as id FROM pcpr1_categories AS cat JOIN pcpr1_categories AS parent ON cat.lft BETWEEN parent.lft AND parent.rgt

2 × SELECT a.*, c.published AS c_published, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug, DATE_FORMAT(a.date, "%Y-%m-%d") AS created,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author FROM `pcpr1_weblinks` AS a LEFT JOIN pcpr1_categories AS c ON c.id = a.catid LEFT JOIN pcpr1_users AS ua ON ua.id = a.created_by LEFT JOIN pcpr1_users AS uam ON uam.id = a.modified_by

1 × SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, CASE WHEN a.modified = 0 THEN a.created ELSE a.modified END as modified, a.modified_by, uam.name as modified_by_name,CASE WHEN a.publish_up = 0 THEN a.created ELSE a.publish_up END as publish_up, a.publish_down, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured, LENGTH(a.fulltext) AS readmore ,CASE WHEN badcats.id is not null THEN 0 ELSE a.state END AS state,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email,contact.id as contactid,parent.title as parent_title, parent.id as parent_id, parent.path as parent_route, parent.alias as parent_alias,ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count as rating_count,c.published, CASE WHEN badcats.id is null THEN c.published ELSE 0 END AS parents_published FROM pcpr1_content AS a LEFT JOIN pcpr1_content_frontpage AS fp ON fp.content_id = a.id LEFT JOIN pcpr1_categories AS c ON c.id = a.catid LEFT JOIN pcpr1_users AS ua ON ua.id = a.created_by LEFT JOIN pcpr1_users AS uam ON uam.id = a.modified_by LEFT JOIN pcpr1_contact_details AS contact on contact.user_id = a.created_by LEFT JOIN pcpr1_categories as parent ON parent.id = c.parent_id LEFT JOIN pcpr1_content_rating AS v ON a.id = v.content_id LEFT OUTER JOIN (SELECT cat.id as id FROM pcpr1_categories AS cat JOIN pcpr1_categories AS parent ON cat.lft BETWEEN parent.lft AND parent.rgt