Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the ways to use the query conditions of big data report?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Big data report query conditions of the use of which, many novices are not very clear, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

As we all know, when designing reports, the data that we need to show is rarely fixed, and we often need to use query conditions to filter out the data we want. In short, the same report can present different data under different parameter controls.

So the question is, what methods do reporting tools generally use to achieve this requirement?

Use the SQL parameter

First of all, of course, it must be said that SQL, under normal circumstances, different filtering conditions will correspond to different WHERE conditions in the fetch SQL, and the report tool can correspond the report parameters to the parameters of SQL, so that different SQL will be generated when entering different report parameters.

If we want to make a report with query conditions, take the order date as the retrieval condition, and query the data in the order information table in different date ranges. The data columns include: order ID, customer ID, order date, delivery date, shipper, owner name, owner region, order amount.

Follow me, let's take the dry report as an example. First, set two parameters, named startdate and enddate:

Then the SQL of the report is written in the form of parameters, and the "?" (question mark) is used in the SQL statement to indicate the parameters:

Select order ID, customer ID, order date, Shipping date, shipper, owner name, owner region, order amount from order Information form where order date >? And order date

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report