Differences between revisions 7 and 8
Revision 7 as of 2005-06-10 07:49:07
Size: 407
Comment:
Revision 8 as of 2008-02-19 15:39:15
Size: 407
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

CategoryComputingTips > SQLCompTips

SQL Tips

This is more a collection of recipes than tips I guess.

Using substring and a sub select

SELECT COUNT(substring),substring FROM ( 
 SELECT SUBSTRING(domainname FROM POSITION('.' in domainname)) FROM orders WHERE type=1) AS foo
 GROUP BY substring;

Group and count domain extensions.

TheEarthWiki: SQLCompTips (last edited 2008-02-19 15:39:15 by localhost)