Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
SELECT substring(pc.gadget_xml, 'gadget/gadgets/(.*).xml') as "gadget_type",
       count(pc.gadget_xml) as "gadget_count"
FROM portletconfiguration pc,
      portalpage pp
WHERE pc.portalpage = pp.id
  AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%'
GROUP BY pc.gadget_xml;

MySQL

Code Block
languagesql
SELECT trim(trailing '.xml' from substr(pc.gadget_xml, length(substring_index(pc.gadget_xml, '/', 6))+2)) as "gadget_type",
       count(pc.gadget_xml) as "gadget_count"
FROM portletconfiguration pc,
     portalpage pp
WHERE pc.portalpage = pp.id
  AND pc.gadget_xml LIKE '%net.brokenbuild.velocity-chart%'
GROUP BY pc.gadget_xml;

...