kafka 查询 SQL Query

Posted 小咖啡

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了kafka 查询 SQL Query相关的知识,希望对你有一定的参考价值。

1.
SELECT COUNT(*) FROM wiseweb_crawler_foreignmedias WHERE site_id=90000 AND (gathertime BETWEEN 2017-05-01 00:00:01 AND 2017-05-10 23:59:59)
2、
SELECT site_id, COUNT(*) FROM  wiseweb_crawler_foreignmedias  WHERE (site_id BETWEEN 90000 and 99999) AND (gathertime BETWEEN 2017-05-11 00:00:01 AND 2017-05-11 23:59:59) GROUP BY site_id limit 3000 
3
title:Иртыш потоп or content:Иртыш потоп AND  gathertime:[ "2017-05-20 00:00:01" TO "2017-05-23 23:59:59"]
4
SELECT site_id,title,publishtime,gathertime FROM wiseweb_crawler_foreignmedias  where (title = %Водная% OR content = %Водная%) AND(title = %сотрудничество% OR content = %сотрудничество%) AND(title = %Китай% OR content = %Китай%)
5
SELECT site_name,title,publishtime,content,url FROM wiseweb_crawler_website20170718 WHERE (title = 舆情 OR content = 舆情) AND (gathertime BETWEEN 2017-07-21 00:00:00 AND 2017-07-28 23:59:59)AND (site_id BETWEEN 129494 AND 130357) 
金融116886-117064
金融 129494- 130357
SELECT site_id,title,publishtime,site_name FROM wiseweb_crawler_website20171024  where (content=%舆情%or content=%舆论引导%or content=%脱敏%or content=%数据脱敏%or content=%精准搜索%or content=%画像%or content=%风控%or content=%风险控制%or content=%内容管理%or content=%大数据分析% or content=%大数据采集%or content=%大数据挖掘%)and(contet=%招标公告% or title=%招标公告%)

SELECT site_id,title,publishtime,content,site_name,url FROM wiseweb_crawler_website20171201  where (content=%舆情%or content=%舆论引导%or content=%脱敏%or content=%数据脱敏%or content=%精准搜索%or content=%画像%or content=%风控%or content=%风险控制%or content=%内容管理%or content=%大数据分析% or content=%大数据采集%or content=%大数据挖掘%)and(contet=%招标公告% or title=%招标公告%)AND (publishtime BETWEEN 2017-12-01 00:00:00 AND 2017-12-08 23:59:59)

 

以上是关于kafka 查询 SQL Query的主要内容,如果未能解决你的问题,请参考以下文章

sql片段的定义

SQL-query 在代码中比直接查询 db 花费更长的时间

Microsoft SQL Server 代码片段收集

在 Java 的 GraphQL 查询中添加片段

SQL -- SQL Server 查询优化器(Query Optimizers)

sql [SQL查询片段]用于在命令行或通过R和其他工具使用SQL的快速代码段#tags:sql,R,text processing,命令li