我是靠谱客的博主 矮小草丛,这篇文章主要介绍mysql字符串处理技巧,现在分享给大家,希望可以做个参考。

http截取域名

select  substring(
        REPLACE (
            REPLACE (
                 concat(params['url'],'/'),
                "https://",
                ""
            ),
            "http://",
            ""
        ),
        1,
        locate(
            "/",
            REPLACE (
                REPLACE (
                     concat(params['url'],'/'),
                    "https://",
                    ""
                ),
                "http://",
                ""
            )
        ) - 1
),count(1) total  from exostsdk.exostsdk  where     event_id='00075|004' and appid = '004' and day='2018-10-24' and cm = 'IN'  group by 


substring(
        REPLACE (
            REPLACE (
                 concat(params['url'],'/'),
                "https://",
                ""
            ),
            "http://",
            ""
        ),
        1,
        locate(
            "/",
            REPLACE (
                REPLACE (
                     concat(params['url'],'/'),
                    "https://",
                    ""
                ),
                "http://",
                ""
            )
        ) - 1
)

 order by total desc limit 200

最后

以上就是矮小草丛最近收集整理的关于mysql字符串处理技巧的全部内容,更多相关mysql字符串处理技巧内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(114)

评论列表共有 0 条评论

立即
投稿
返回
顶部