how to group by and count using MySQL

后端 未结 4 1074
死守一世寂寞
死守一世寂寞 2021-01-29 01:51

I have data which looks like this:

ID  post_author post_title  guid
3309    21  Should somebody not yet on SQL 2008 wait for SQL 2008 R2, since it\'s near release?  h         


        
4条回答
  •  攒了一身酷
    2021-01-29 02:07

    It may be possible to construct such a query but will be not optimized.

    You should add a column to your table which will have an ID of the site. Then add a new table which will have a preparsed data for the site: domain, path, resource, whether http or https, etc

    This way you can be more flexible in searches and will be much faster, since I assume you have few inserts and large number of reads.

提交回复
热议问题