|
Size: 454
Comment:
|
Size: 407
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 18: | Line 18: |
| http://www.yipu.com.cn/shangjia/info7.html |
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.