Bookshelf Home | Contents | Index | PDF |
Siebel Analytics User Guide > Filtering Requests in Siebel Answers > Editing the SQL for a Column Filter in a Siebel Analytics RequestYou can edit the logical SQL WHERE clause to be used as a filter. While generally not necessary, this feature is available for users who need advanced filtering capability. For a comprehensive description of SQL syntax, refer to a third-party reference book on SQL, to a reference manual on SQL from one of the database vendors, or to an online reference site. To edit the SQL generated for a column filter
Example Siebel Answers FiltersThis section contains example SQL for example requests against hypothetical data sources. The WHERE clause contains the filters. You can review these examples to see some of the kinds of information you can obtain using filters. If you want to use an example in an actual request, you will need to modify it to reflect the table and column names used in your organization's data sources. Example 1: Identifying Customers with the Most Sales VolumeThe following example request reports data on the ten customers with the most sales volume in 2003. SELECT Customers.Customer, Periods.Year, SalesFacts.Dollars, RANK(SalesFacts.Dollars), Sales_YAgo.DollarsPctChgVsYAgo, AND RANK(SalesFacts.Dollars) <= 10 ORDER BY 4 Example 2: Reporting Sales for a Particular BrandThe following example request reports data on the Fizzy Brands company. WHERE Product.Brand = 'Fizzy Brands' Example 3: Reporting Salaries Above a Certain AmountIn the following example request, the filter in the WHERE clause limits the output to individuals whose yearly salaries are greater than 75000, for example, $75,000 in US dollars. SELECT "Name.Lastname", "Name.Firstname", "Salary.YearlySalary" FROM "SalaryTable" WHERE "Salary.YearlySalary" > 75000 Example 4: Sales Representative's Share of East RegionThe following example request limits data to customers in the East region in the year 2003. SELECT Periods.Year, Customers.Region, Customers.SalesRep, SalesFacts.Dollars, Sales_YAgo."ShareOfRegion$YAgo" Example 5: Reporting Sales Amount by Product CategoryThe following example request reports the sales amount by product category in the local currency for the latest date in the fact table. LatestSalesDate is a Dynamic Repository variable. SELECT Product."Product Category Name", "Facts -- Non Aggregatable".Currency, "Facts Local Currency".SalesAmount FROM AdventureWorks1 WHERE Time.Date = VALUEOF(LatestSalesDate) Related Topic |
Siebel Analytics User Guide |