The document discusses SQL pattern matching using regular expressions. It provides an introduction to regular expression concepts and functions in Oracle for pattern matching like REGEXP_LIKE, REGEXP_SUBSTR, etc. It then describes how to go beyond the capabilities of these functions to retrieve related rows using SQL pattern matching with clauses like MATCH_RECOGNIZE, PATTERN, DEFINE, MEASURES and examples like identifying successive login failures and sessionization of clickstream data.
This document discusses concepts and methods for measuring productivity and efficiency. It begins by defining key terminology like productivity, technical efficiency, and allocative efficiency. It then describes set theoretic representations of production technologies and properties like constant returns to scale. Methods for measuring efficiency are described, including data envelopment analysis, index numbers, and stochastic frontier analysis. Distance functions and their relationship to production frontiers are explained. The document concludes by discussing measuring productivity and productivity change over time using a total factor productivity index.
This document discusses stochastic frontier analysis and techniques for estimating production frontiers and cost frontiers using cross-sectional and panel data. It covers distance functions, cost frontiers, decomposing cost efficiency into technical and allocative components, measuring scale efficiency, and accounting for the production environment in panel data models.
This document discusses methods for measuring total factor productivity (TFP) change using panel data. It introduces the Malmquist TFP index, which can decompose TFP change into technical change and technical efficiency change components. The document outlines how to calculate the Malmquist index and its components using data envelopment analysis (DEA) and stochastic frontier analysis (SFA) approaches. It provides examples of applying the DEA method to estimate TFP, technical efficiency change, technological change, and other indices for firms over multiple time periods.
This document provides an overview of data envelopment analysis (DEA) for measuring efficiency. It begins with introducing efficiency measurement concepts and the constant returns to scale DEA model. It then discusses input and output orientations, and how to estimate technical and allocative efficiency using DEA. The document provides examples to illustrate DEA models and efficiency measures, including presenting results from a simple numerical example. It summarizes key aspects of standard DEA models and their applications.
This document discusses the economic-theoretic approach to index numbers, including output and input price indices. It describes how output price indices can be defined using revenue functions and how they satisfy desirable properties if technology is output-homothetic or exhibits implicit output neutrality. Input price indices are defined using cost functions and satisfy useful properties if technology is input-homothetic or exhibits implicit Hicks neutrality. The Törnqvist and Fisher indices are shown to approximate the theoretical indices under certain conditions.
Index numbers are used to measure changes in economic variables over time or space. Common index numbers include the Laspeyres, Paasche, Fisher, and Törnqvist indexes. These indexes can be used to create price indexes that measure inflation, as well as quantity indexes that measure changes in output and inputs. Direct and indirect approaches can be used to calculate quantity indexes. Properties like transitivity, self-duality, and mean value are important in selecting an appropriate index number formula. Chain indexes that compare consecutive periods are commonly used for productivity measurement.
This document provides an overview and outline of topics to be covered in an economics course on production and productivity measurement. It includes informal definitions of key concepts such as production frontier, total factor productivity, technical efficiency and scale economies. It also summarizes the main methods that will be covered, including least squares regression, total factor productivity indices, data envelopment analysis, and stochastic frontiers. Finally, it outlines the chapters that will be included in the course, covering production economics, measurement concepts, index number methods, data and measurement issues, and an introduction to data envelopment analysis.
The document discusses SQL pattern matching using regular expressions. It provides an introduction to regular expression concepts and functions in Oracle for pattern matching like REGEXP_LIKE, REGEXP_SUBSTR, etc. It then describes how to go beyond the capabilities of these functions to retrieve related rows using SQL pattern matching with clauses like MATCH_RECOGNIZE, PATTERN, DEFINE, MEASURES and examples like identifying successive login failures and sessionization of clickstream data.
This document discusses concepts and methods for measuring productivity and efficiency. It begins by defining key terminology like productivity, technical efficiency, and allocative efficiency. It then describes set theoretic representations of production technologies and properties like constant returns to scale. Methods for measuring efficiency are described, including data envelopment analysis, index numbers, and stochastic frontier analysis. Distance functions and their relationship to production frontiers are explained. The document concludes by discussing measuring productivity and productivity change over time using a total factor productivity index.
This document discusses stochastic frontier analysis and techniques for estimating production frontiers and cost frontiers using cross-sectional and panel data. It covers distance functions, cost frontiers, decomposing cost efficiency into technical and allocative components, measuring scale efficiency, and accounting for the production environment in panel data models.
This document discusses methods for measuring total factor productivity (TFP) change using panel data. It introduces the Malmquist TFP index, which can decompose TFP change into technical change and technical efficiency change components. The document outlines how to calculate the Malmquist index and its components using data envelopment analysis (DEA) and stochastic frontier analysis (SFA) approaches. It provides examples of applying the DEA method to estimate TFP, technical efficiency change, technological change, and other indices for firms over multiple time periods.
This document provides an overview of data envelopment analysis (DEA) for measuring efficiency. It begins with introducing efficiency measurement concepts and the constant returns to scale DEA model. It then discusses input and output orientations, and how to estimate technical and allocative efficiency using DEA. The document provides examples to illustrate DEA models and efficiency measures, including presenting results from a simple numerical example. It summarizes key aspects of standard DEA models and their applications.
This document discusses the economic-theoretic approach to index numbers, including output and input price indices. It describes how output price indices can be defined using revenue functions and how they satisfy desirable properties if technology is output-homothetic or exhibits implicit output neutrality. Input price indices are defined using cost functions and satisfy useful properties if technology is input-homothetic or exhibits implicit Hicks neutrality. The Törnqvist and Fisher indices are shown to approximate the theoretical indices under certain conditions.
Index numbers are used to measure changes in economic variables over time or space. Common index numbers include the Laspeyres, Paasche, Fisher, and Törnqvist indexes. These indexes can be used to create price indexes that measure inflation, as well as quantity indexes that measure changes in output and inputs. Direct and indirect approaches can be used to calculate quantity indexes. Properties like transitivity, self-duality, and mean value are important in selecting an appropriate index number formula. Chain indexes that compare consecutive periods are commonly used for productivity measurement.
This document provides an overview and outline of topics to be covered in an economics course on production and productivity measurement. It includes informal definitions of key concepts such as production frontier, total factor productivity, technical efficiency and scale economies. It also summarizes the main methods that will be covered, including least squares regression, total factor productivity indices, data envelopment analysis, and stochastic frontiers. Finally, it outlines the chapters that will be included in the course, covering production economics, measurement concepts, index number methods, data and measurement issues, and an introduction to data envelopment analysis.
This document provides an overview of econometric methods for estimating economic relationships such as production, cost, and profit functions. It discusses estimating parameters for different functional forms using ordinary least squares and maximum likelihood methods. It also covers imposing equality constraints to satisfy properties implied by economic theory and testing these constraints using statistical tests.
This document discusses methods for measuring total factor productivity (TFP) change using index numbers. It addresses TFP measurement in both binary and multilateral comparisons. For binary comparisons between two time periods or firms, the Fisher and Törnqvist indices are commonly used to calculate output and input quantity indices, which are then combined to form a TFP index. For multilateral comparisons across multiple firms, the EKS method is used to transform initial non-transitive indices, like Törnqvist indices, into transitive multilateral indices that satisfy internal consistency requirements.
This document discusses the economic-theoretic approach to index numbers. It begins by outlining how output and input price indices and output and input quantity indices can be defined using revenue, cost, and distance functions based on microeconomic production theory. It then shows that under certain conditions, such as a translog functional form, the Törnqvist and Fisher indices provide good approximations to the theoretical indices and can be computed directly from price and quantity data without full knowledge of production functions.
This document provides an overview of linear programming concepts including:
1) The mathematical formulation of a linear programming problem with an objective function and constraints.
2) The basic assumptions and graphical solution method for linear programming problems.
3) Key terms used in linear programming like feasible solution, optimal solution, corner point solution.
4) The simplex method for solving linear programming problems through an iterative process of moving between corner point solutions.
5) Sensitivity analysis and shadow prices to understand how changes to parameters impact the optimal solution.
This document provides an overview of operations research and linear programming. It defines operations research as optimal decision-making and modeling of deterministic and probabilistic systems from real life that involve allocating limited resources. Linear programming is introduced as an optimization technique for problems with a linear objective function and constraints. The document outlines the assumptions, formulation, and solution approach for linear programming models. Examples of linear programming formulations are provided for production mix, portfolio selection, and production planning problems.
When a global provider of Derivatives and Trading Systems needed to maximize their network performance and improve their network monitoring and data analysis, they turned to Net Optics Director Data Monitoring Switch. The firm faced the challenge of optimizing multiple redundant data centers to provide customers with the fastest possible access to trading data from international futures markets. Director’s ability to connect dozens or hundreds of critical high-volume data links dynamically to monitoring tools made it the ideal solution for providing the firm’s customers with the performance they demanded.
What you will learn:
Presented by Net Optics' FAE Aron Ingebrigtsen, this webinar will walk through a specific deployment scenario of Net Optics' Director Data Monitoring Switch as a key network infrastructure component for a global leader in Derivatives and Trading Systems.
Join us to discover:
The advantages of gaining 100% visibility across multiple data centers
How key features such as aggregation, regeneration, and traffic filtering at line speed make Director ideally suited to high-performance networking
The key business benefits of traffic monitoring and inspection
This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In just one sentence, it pitches the idea of using Haiku Deck to easily create engaging slideshows.
The document announces performances of the play "Catfish Moon" by Laddy Sartin at the Open Space Cafe Theatre from September 9th to 18th. The play is about three southern men who go fishing and encounter a woman who is somehow connected to all three of them, with fun and funny revelations about their connections. Performances will be held Thursdays, Fridays and Saturdays at 8pm, with a Sunday matinee on September 12th at 2pm. The document provides contact information for reservations.
When you're building a solution to support 40,000 Department of Defense personnel from a central command center, one of the most demanding and security conscious customers in the world, you'd better know what's happening on your network. Join us for this webinar as we profile a recent use case where ensuring the validity of the data traveling on the network, and delivering time-sensitive information without delays was absolutely critical. Net Optics Tap technology provided the answer this Defense Contractor was looking for and proved mighty enough to conquer the needs of this demanding customer.
In this Webinar:
Understand the immediate impact and business value of deploying Network Taps
Learn how the ability to monitor and troubleshoot network issues remotely increases end-user satisfaction
Identify key points in your network where 100% visibility is critical to reducing mean-time-to-repair (MTTR) and improving network uptime
About Net Optics, Inc.
Net Optics is the leading provider of Intelligent Access and Monitoring Architecture solutions that deliver real-time IT visibility, monitoring and control. As a result, businesses achieve peak performance in network analytics and security. More than 7,500 enterprises, service providers and government organizations—including 85 percent of the Fortune 100—trust Net Optics’ comprehensive smart access hardware and software solutions to plan, scale and future-proof their networks through an easy-to-use interface. Net Optics maintains a global presence through leading OEM partner and reseller networks.
Web: http://www.netoptics.com
Phone: 408-737-7777
Twitter: @netoptics
Facebook: http://www.facebook.com/netoptics
LinkedIn: http://www.linkedin.com/company/net-optics-inc.
A empresa de tecnologia anunciou um novo smartphone com câmera aprimorada, maior tela e melhor processador. O novo aparelho custará US$ 100 a mais que o modelo anterior e estará disponível para pré-venda em 1 mês. Analistas esperam que o novo smartphone ajude a empresa a aumentar suas vendas e receita no próximo trimestre.
Aquesta presentació va ser exposada com a suport a la conferència 'Les 10 claus del cas Mercuri' impartida pel director de iSabadell, a l'Espai Àgora del centre cívic de Sol i Padrís de Sabadell el 14 de març de 2013.
This document provides rules for forming comparatives and superlatives in English. It explains that one-syllable adjectives typically take -er and -est, with spelling changes if the adjective ends in certain letters. Two-syllable adjectives ending in -y take -er and -est, while those ending in -ed, -ing, -ful or -less take more and most. Adjectives with three or more syllables also take more and most. Irregular adjectives like good, bad and far are also discussed. The uses of comparatives and superlatives are outlined, along with opposite forms less and least.
Body language communicates internal emotions and mental states through clusters of signals and postures. It can indicate states like aggression, boredom, deception, defense, evaluation, openness, power, relaxation, and submission. Aggressive body language includes facial signals of disapproval and attack signals like clenched fists. Boredom is shown through distraction, repetitive motions, and disinterest. Deception involves signs of anxiety, control, and distraction. Defensive body language aims to cover vital organs and find escape. Emotions have distinct body language cues like anger's red face and fear's cold sweat. Evaluation features hand movements and intense focus. Power uses direct eye contact and touching. Relaxation has a balanced torso and steady breathing. Sub
El documento habla sobre la importancia de integrar las herramientas tecnológicas en el aula para mejorar la calidad de la educación a través de un aprendizaje significativo, colaborativo y activo. También enfatiza la necesidad de superar los miedos al fracaso y a los cambios para apropiarse de las tecnologías del siglo XXI y no quedarse estancado.
This document summarizes research on surface potential heterogeneity in organic semiconductors. Kelvin probe force microscopy was used to characterize the surface potential distributions of various organic materials and substrates. The results showed spatially inhomogeneous trapping of positive and negative charges, forming "nanoscale trap islands". Patterning experiments on P3HT-PCBM blends revealed potential differences between structured and unstructured areas. This suggests an electronic disorder not solely due to morphological factors. The findings imply asymmetric transport pathways in organic semiconductors influenced by an underlying electronic disorder over multiple time domains.
This document provides an overview of econometric methods for estimating economic relationships such as production, cost, and profit functions. It discusses estimating parameters for different functional forms using ordinary least squares and maximum likelihood methods. It also covers imposing equality constraints to satisfy properties implied by economic theory and testing these constraints using statistical tests.
This document discusses methods for measuring total factor productivity (TFP) change using index numbers. It addresses TFP measurement in both binary and multilateral comparisons. For binary comparisons between two time periods or firms, the Fisher and Törnqvist indices are commonly used to calculate output and input quantity indices, which are then combined to form a TFP index. For multilateral comparisons across multiple firms, the EKS method is used to transform initial non-transitive indices, like Törnqvist indices, into transitive multilateral indices that satisfy internal consistency requirements.
This document discusses the economic-theoretic approach to index numbers. It begins by outlining how output and input price indices and output and input quantity indices can be defined using revenue, cost, and distance functions based on microeconomic production theory. It then shows that under certain conditions, such as a translog functional form, the Törnqvist and Fisher indices provide good approximations to the theoretical indices and can be computed directly from price and quantity data without full knowledge of production functions.
This document provides an overview of linear programming concepts including:
1) The mathematical formulation of a linear programming problem with an objective function and constraints.
2) The basic assumptions and graphical solution method for linear programming problems.
3) Key terms used in linear programming like feasible solution, optimal solution, corner point solution.
4) The simplex method for solving linear programming problems through an iterative process of moving between corner point solutions.
5) Sensitivity analysis and shadow prices to understand how changes to parameters impact the optimal solution.
This document provides an overview of operations research and linear programming. It defines operations research as optimal decision-making and modeling of deterministic and probabilistic systems from real life that involve allocating limited resources. Linear programming is introduced as an optimization technique for problems with a linear objective function and constraints. The document outlines the assumptions, formulation, and solution approach for linear programming models. Examples of linear programming formulations are provided for production mix, portfolio selection, and production planning problems.
When a global provider of Derivatives and Trading Systems needed to maximize their network performance and improve their network monitoring and data analysis, they turned to Net Optics Director Data Monitoring Switch. The firm faced the challenge of optimizing multiple redundant data centers to provide customers with the fastest possible access to trading data from international futures markets. Director’s ability to connect dozens or hundreds of critical high-volume data links dynamically to monitoring tools made it the ideal solution for providing the firm’s customers with the performance they demanded.
What you will learn:
Presented by Net Optics' FAE Aron Ingebrigtsen, this webinar will walk through a specific deployment scenario of Net Optics' Director Data Monitoring Switch as a key network infrastructure component for a global leader in Derivatives and Trading Systems.
Join us to discover:
The advantages of gaining 100% visibility across multiple data centers
How key features such as aggregation, regeneration, and traffic filtering at line speed make Director ideally suited to high-performance networking
The key business benefits of traffic monitoring and inspection
This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In just one sentence, it pitches the idea of using Haiku Deck to easily create engaging slideshows.
The document announces performances of the play "Catfish Moon" by Laddy Sartin at the Open Space Cafe Theatre from September 9th to 18th. The play is about three southern men who go fishing and encounter a woman who is somehow connected to all three of them, with fun and funny revelations about their connections. Performances will be held Thursdays, Fridays and Saturdays at 8pm, with a Sunday matinee on September 12th at 2pm. The document provides contact information for reservations.
When you're building a solution to support 40,000 Department of Defense personnel from a central command center, one of the most demanding and security conscious customers in the world, you'd better know what's happening on your network. Join us for this webinar as we profile a recent use case where ensuring the validity of the data traveling on the network, and delivering time-sensitive information without delays was absolutely critical. Net Optics Tap technology provided the answer this Defense Contractor was looking for and proved mighty enough to conquer the needs of this demanding customer.
In this Webinar:
Understand the immediate impact and business value of deploying Network Taps
Learn how the ability to monitor and troubleshoot network issues remotely increases end-user satisfaction
Identify key points in your network where 100% visibility is critical to reducing mean-time-to-repair (MTTR) and improving network uptime
About Net Optics, Inc.
Net Optics is the leading provider of Intelligent Access and Monitoring Architecture solutions that deliver real-time IT visibility, monitoring and control. As a result, businesses achieve peak performance in network analytics and security. More than 7,500 enterprises, service providers and government organizations—including 85 percent of the Fortune 100—trust Net Optics’ comprehensive smart access hardware and software solutions to plan, scale and future-proof their networks through an easy-to-use interface. Net Optics maintains a global presence through leading OEM partner and reseller networks.
Web: http://www.netoptics.com
Phone: 408-737-7777
Twitter: @netoptics
Facebook: http://www.facebook.com/netoptics
LinkedIn: http://www.linkedin.com/company/net-optics-inc.
A empresa de tecnologia anunciou um novo smartphone com câmera aprimorada, maior tela e melhor processador. O novo aparelho custará US$ 100 a mais que o modelo anterior e estará disponível para pré-venda em 1 mês. Analistas esperam que o novo smartphone ajude a empresa a aumentar suas vendas e receita no próximo trimestre.
Aquesta presentació va ser exposada com a suport a la conferència 'Les 10 claus del cas Mercuri' impartida pel director de iSabadell, a l'Espai Àgora del centre cívic de Sol i Padrís de Sabadell el 14 de març de 2013.
This document provides rules for forming comparatives and superlatives in English. It explains that one-syllable adjectives typically take -er and -est, with spelling changes if the adjective ends in certain letters. Two-syllable adjectives ending in -y take -er and -est, while those ending in -ed, -ing, -ful or -less take more and most. Adjectives with three or more syllables also take more and most. Irregular adjectives like good, bad and far are also discussed. The uses of comparatives and superlatives are outlined, along with opposite forms less and least.
Body language communicates internal emotions and mental states through clusters of signals and postures. It can indicate states like aggression, boredom, deception, defense, evaluation, openness, power, relaxation, and submission. Aggressive body language includes facial signals of disapproval and attack signals like clenched fists. Boredom is shown through distraction, repetitive motions, and disinterest. Deception involves signs of anxiety, control, and distraction. Defensive body language aims to cover vital organs and find escape. Emotions have distinct body language cues like anger's red face and fear's cold sweat. Evaluation features hand movements and intense focus. Power uses direct eye contact and touching. Relaxation has a balanced torso and steady breathing. Sub
El documento habla sobre la importancia de integrar las herramientas tecnológicas en el aula para mejorar la calidad de la educación a través de un aprendizaje significativo, colaborativo y activo. También enfatiza la necesidad de superar los miedos al fracaso y a los cambios para apropiarse de las tecnologías del siglo XXI y no quedarse estancado.
This document summarizes research on surface potential heterogeneity in organic semiconductors. Kelvin probe force microscopy was used to characterize the surface potential distributions of various organic materials and substrates. The results showed spatially inhomogeneous trapping of positive and negative charges, forming "nanoscale trap islands". Patterning experiments on P3HT-PCBM blends revealed potential differences between structured and unstructured areas. This suggests an electronic disorder not solely due to morphological factors. The findings imply asymmetric transport pathways in organic semiconductors influenced by an underlying electronic disorder over multiple time domains.
- Quizy.mea is a Turkish social network that allows users to write "fill in the blanks" questions and have them answered randomly by other users.
- It has over 10,000 users, 5,000 questions, and 100,000 answers after being available for over 100 days. It also has over 1,000,000 visits and press coverage on 184 websites and 132 blogs.
- The founder, Omer Ekinci, is an experienced entrepreneur and mobile technologies expert who created prior location-based mobile marketing platforms. He leads a team that directly works on Quizy.me.
This document discusses OLAP functions in Informix 12.1. It provides an overview of OLAP and what it is used for in business intelligence. It then describes the OVER clause and how it defines the domain of OLAP function calculation using optional PARTITION BY, ORDER BY, and WINDOW FRAME clauses. Several examples of ranking, aggregation, and analytic OLAP functions like RANK, SUM, and LAG are shown. The document concludes by noting how OLAP functions can be accelerated by the Informix Warehouse Accelerator.
This document discusses analytical functions in Teradata. It describes various types of analytical functions including window aggregate functions like AVG, COUNT, MAX, MIN, SUM, rank functions like RANK and PERCENT_RANK, row number functions like ROW_NUMBER, and Teradata-specific functions like CSUM, MAVG, MDIFF, MSUM, and QUANTILE. It provides examples of how to use these functions with WINDOW clauses like PARTITION BY and ORDER BY.
I will begin with a brief overview of SQL. Then the five major topics a data scientist should understand when working with relational databases: basic statistics in SQL, data preparation in SQL, advanced filtering and data aggregation, window functions, and preparing data for use with analytics tools.
Analytic functions allow calculations to be performed on sets of rows and return multiple rows of data per record. They are similar to aggregate functions but do not group results. Some common analytic functions discussed include ROW_NUMBER, RANK, DENSE_RANK, LEAD, LAG, FIRST_VALUE, LAST_VALUE. The document also describes functions like LISTAGG, TRANSLATE, REGEXP_LIKE, REGEXP_COUNT, COALESCE, EXTRACT, ADD_MONTHS, INITCAP, INSTR and GREATEST.
Simplifying SQL with CTE's and windowing functionsClayton Groom
Too busy to learn the new capabilities of SQL Server? This session will cover several of the new features of the T-SQL language, specifically Common Table Expressions (CTE's) and Windowing Functions. This will be an code-heavy session with examples hat you can readily leverage in your solutions.
The focus will be on techniques to shape and manipulate your data for easier consumption by your application, and to leverage your SQL Server to avoid writing code in your application.
A basic to intermediate understanding of T-SQL is required.
Are you an Oracle developer or a DBA?
Do you know the difference between aggregate and analytic functions?
Without complex sub-queries or self-joins, do you know how to:
Calculate running/cumulative totals and moving/centered averages?
List products with revenues above or below their peers or product groups?
Compute the ratio of one category’s sales to the total sales?
Select the Top-N or Top N % of the customers/products?
Classify advertisers into quartiles/n-tiles based on the revenue potential?
Compare period-over-period (year-over-year, month-over-month) growth and rank advancement?
Convert rows into columns (pivot), columns into rows (unpivot) or aggregate strings?
Perform what-if analysis and hypothetical ranking?
Analytic functions are more performant because tables need to be scanned only once. They make you more productive because there is no need to write procedural code. No wonder Tom Kyte, a well-respected Oracle guru, says analytic functions are the best thing to happen after the sliced bread.
In the first half, I will cover the basics of the various analytic functions:
Ranking: RANK, DENSE_RANK, ROW_NUMBER, NTILE, CUME_DIST, PERCENTILE_RANK
Windowing: SUM, AVG, MAX, MIN, FIRST_VALUE, LAST_VALUE
Reporting: RATIO_TO_REPORT
Others: FIRST/LAST, LEAD/LAG, hypothetical ranking,
In the second half, I will show how powerful these functions are with a few examples.
If there is time, I will cover enhanced aggregation (ROLLUP, CUBE, GROUPING SET extensions to GROUP BY clause)
This class would be useful for both developers and DBAs alike, especially for those working in Analytic, Business Intelligence, and Datawarehouse environments.
Are you already an expert in analytic functions? Then come and help me refine the content.
For more info, read
http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/analysis.htm
http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/aggreg.htm
rollup, cross-tabulation across different dimensions using ROLLUP, CUBE and GROUPING SETS extension to GROUP BY clause
, most active time-periods (i.e. days when the most number of tickets are open in BZ, hours with the most take-off and landings, months with the highest sales, 5-minute periods with the maximum number of calls made, etc)
data densification?
their rank last year, this year, rank growth, running/cumulative total (Year-To-Date/Month-To-Date summation), moving averages, Year-Over-Year comparison, sales projection, average/min/max time between one sale and the next sale, products with above and below average sales.
overall average, sum, departmental average, sum, ranking, job wise ranking in one SQL.
Feature Engineering - Getting most out of data for predictive models - TDC 2017Gabriel Moreira
How should data be preprocessed for use in machine learning algorithms? How to identify the most predictive attributes of a dataset? What features can generate to improve the accuracy of a model?
Feature Engineering is the process of extracting and selecting, from raw data, features that can be used effectively in predictive models. As the quality of the features greatly influences the quality of the results, knowing the main techniques and pitfalls will help you to succeed in the use of machine learning in your projects.
In this talk, we will present methods and techniques that allow us to extract the maximum potential of the features of a dataset, increasing flexibility, simplicity and accuracy of the models. The analysis of the distribution of features and their correlations, the transformation of numeric attributes (such as scaling, normalization, log-based transformation, binning), categorical attributes (such as one-hot encoding, feature hashing, Temporal (date / time), and free-text attributes (text vectorization, topic modeling).
Python, Python, Scikit-learn, and Spark SQL examples will be presented and how to use domain knowledge and intuition to select and generate features relevant to predictive models.
This document discusses SQL windowing functions. It covers topics such as window aggregate functions like COUNT, SUM, AVG; set-based vs iterative programming; uses of window functions like paging, deduplicating data, and running totals; ranking functions; common table expressions; optimizing ranking functions; creating sequences; removing duplicate entries; pivoting; and what's new in SQL Server 2012 like distribution and offset functions.
This document discusses Oracle query optimizer concepts like selectivity, cardinality, and object statistics. It provides examples of how the optimizer estimates cardinality based on statistics values like number of rows, distinct values, density and nulls. It also shows how index statistics like clustering factor, leaf blocks impact the choice between an index scan or full table scan.
TechEvent 2019: Uses of Row Pattern Matching; Kim Berg Hansen - TrivadisTrivadis
This document discusses using row pattern matching to merge overlapping date ranges in a table. It provides an example of a table containing date range records with open-ended end dates. A pattern is defined to match overlapping or adjacent date ranges, and the output merges the ranges into continuous date range groups.
Oracle provides several analytical functions that allow for powerful data analysis using SQL. These include group functions that aggregate data over groups or windows, as well as window functions like ROW_NUMBER, RANK, and LAG that analyze data relative to the current row. ROLLUP and CUBE extensions to the GROUP BY clause enable calculation of subtotals across multiple dimensions of data with a single query.
Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
Session from ILOUG I presented in May, 2016
Even though DBAs and developers are writing SQL queries every day, it seems that advanced SQL techniques such as multi-dimension aggregation and analytic functions are still relatively remain unknown. In this session, we will explore some of the common real-world usages for analytic function, and understand how to take advantage of this great and useful tool. We will deep dive into ranking based on values and groups; understand aggregation of multiple dimensions without a group by; see how to do inter-row calculations, and much-much more…
Together we will see how we can unleash the power of analytics using Oracle 11g best practices and Oracle 12c new features.
Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
Session from BGOUG I presented in June, 2016
Even though DBAs and developers are writing SQL queries every day, it seems that advanced SQL techniques such as multi-dimension aggregation and analytic functions are still relatively remain unknown. In this session, we will explore some of the common real-world usages for analytic function, and understand how to take advantage of this great and useful tool. We will deep dive into ranking based on values and groups; understand aggregation of multiple dimensions without a group by; see how to do inter-row calculations, and much-much more…
Together we will see how we can unleash the power of analytics using Oracle 11g best practices and Oracle 12c new features.
Oracle Advanced SQL and Analytic FunctionsZohar Elkayam
Even though DBAs and developers are writing SQL queries every day, it seems that advanced SQL techniques such as multidimension aggregation and analytic functions still remain relatively unknown. In this session, we will explore some of the common real-world usages for analytic function and understand how to take advantage of this great and useful tool. We will deep dive into ranking based on values and groups, understand aggregation of multiple dimensions without a group by, see how to do inter-row calculations, and much more.
This is the presentation slides which was presented in Kscope 17 on June 28, 2017.
Using R in Kaggle Competitions.
Kaggle has been the most popular data science platform linking close to half a million of data scientists worldwide. How to get yourself a decent ranking on Kaggle competitions with R programming, eXtreme Gradient BOOSTing, and a laptop. Great machine learning tools for all levels to get started and learn. Find out how to perform features engineering, tuning XGB models, selecting a sizable cross validations and performing model ensembles.
Feature Engineering - Getting most out of data for predictive modelsGabriel Moreira
How should data be preprocessed for use in machine learning algorithms? How to identify the most predictive attributes of a dataset? What features can generate to improve the accuracy of a model?
Feature Engineering is the process of extracting and selecting, from raw data, features that can be used effectively in predictive models. As the quality of the features greatly influences the quality of the results, knowing the main techniques and pitfalls will help you to succeed in the use of machine learning in your projects.
In this talk, we will present methods and techniques that allow us to extract the maximum potential of the features of a dataset, increasing flexibility, simplicity and accuracy of the models. The analysis of the distribution of features and their correlations, the transformation of numeric attributes (such as scaling, normalization, log-based transformation, binning), categorical attributes (such as one-hot encoding, feature hashing, Temporal (date / time), and free-text attributes (text vectorization, topic modeling).
Python, Python, Scikit-learn, and Spark SQL examples will be presented and how to use domain knowledge and intuition to select and generate features relevant to predictive models.
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...tdc-globalcode
This document discusses various techniques for feature engineering raw data to improve machine learning model performance. It describes transforming data through techniques like handling missing values, aggregation, binning, encoding categorical features, and feature selection. The goal of feature engineering is to represent the underlying problem to models in a way that results in better accuracy on new data.
Data structure and algorithm using javaNarayan Sau
This presentation created for people who like to go back to basics of data structure and its implementation. This presentation mostly helps B.Tech , Bsc Computer science students as well as all programmer who wants to develop software in core areas.
The document discusses Vertica, a column-oriented database management system. It explains that Vertica provides 10x to 100x better performance than traditional RDBMS through its columnar storage format, linear scalability, and built-in fault tolerance. The document then provides details on how Vertica works, how to properly use it through configuration of projections and sort orders, and examples of queries and optimizations on a sample dataset.
Similar to Enabling Applications with Informix' new OLAP functionality (20)
Discover the power of Recursive SQL and query transformation with Informix da...Ajay Gupte
This presentation will provide an overview of the Recursive SQL with the CONNECT BY clause feature. We will provide examples of typical practical database problems and describe in detail how they can be solved with recursive SQL. The problems discussed include for bill of materials, obtaining the number of employees for each manager in a particular sub-organization, converting linked dimension hierarchies in a star schema to fixed dimension hierarchies, tracking packages, and generating test data. This presentation compares the new solutions with traditional solutions of these problems and discusses the advantages and disadvantages of the various methods. This presentation will also discuss the query transformation techniques with Informix 12.10 features which will focus on how query blocks are moved between different levels and optimized using examples and diagrams. Users will learn how to analyze complex examples based on various Informix 12.10 features. Examples included in this session are query block movement, table re-ordering, complex ANSI joins, sub-queries, derived tables, views, connect by, OLAP functions, setops cases.
Using Lateral derived table in Informix databaseAjay Gupte
This presentation will focus on Lateral derived table concept along with various examples. It will cover lateral correlation overview and user scenarios with views, stored procedures and complex queries. It will show how Informix Server execute Lateral correlation in different cases. Users will learn how to build Lateral correlation in application development.
Building a Hierarchical Data Model Using the Latest IBM Informix FeaturesAjay Gupte
Learn about developing Hierarchical queries using Informix features such as OLAP functions, setops operators and query rewrite. This presentation will cover building the hierarchical data model using existing relational schema in IDS. You learn about customer scenarios for designing hierarchical data model, in-depth knowledge of complex hierarchical queries, performance tips and references. This talk will provide details on how to identify hierarchical relationship and take advantage of using existing relational model.
Using JSON/BSON types in your hybrid application environmentAjay Gupte
This presentation will cover overview of
JSON/BSON types along with various SQL
features. It will cover JSON/BSON data extraction, performance & tips for hybrid environment.
Examples will have SQL features such as Views,
Derived Tables, Stored Procedure, Hierarchical
queries
How IBM API Management use Informix and NoSQLAjay Gupte
IBM API Management product version 3 (V3) has been
re-design and re- architected from ground up to
be able to handle scale in a cloud environment as
well as in an on-premise environment, but also to
be able to deliver features at a faster pace. As
part of this process. This session will cover Programming Model Best Practices with NoSQL Technology and Informix Database.
NoSQL Analytics: JSON Data Analysis and Acceleration in MongoDB WorldAjay Gupte
In analytics world, when you need to process many millions or billions of documents to generate a single report. Novel techniques have been developed for exploiting modern processor architecture (larger on-chip cache, SIMD processing, compression, vector processing, columnar approach). Now, this technology is available to process your large JSON data. This talk will discuss analysis of JSON data using advanced data warehousing techniques and make it simple and seamless for the application/tool developer.
IBM Informix Database SQL Set operators and ANSI Hash JoinAjay Gupte
This document discusses SQL set operators like UNION, INTERSECT, and MINUS. It explains that INTERSECT returns rows common to two result sets, while MINUS returns rows in the first set not in the second. The operators support NULLs and have rules like UNION. Examples demonstrate their usage in views, derived tables, and procedures. Optimization techniques like nested loops and hash joins are covered. Scenarios illustrate uses like finding overlapping or non-overlapping supplier and order IDs. ANSI join improvements like hash joins are also summarized.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfUndress Baby
The quest for the best AI face swap solution is marked by an amalgamation of technological prowess and artistic finesse, where cutting-edge algorithms seamlessly replace faces in images or videos with striking realism. Leveraging advanced deep learning techniques, the best AI face swap tools meticulously analyze facial features, lighting conditions, and expressions to execute flawless transformations, ensuring natural-looking results that blur the line between reality and illusion, captivating users with their ingenuity and sophistication.
Web:- https://undressbaby.com/
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
2. Agenda
•What is OLAP
•OLAP functions in Informix
– the OVER clause
– supported OLAP functions
•Questions?
3. What is OLAP?
• On-Line Analytical Processing
• Commonly used in Business
Intelligence (BI) tools
– ranking products, salesmen, items, etc
– exposing trends in sales from historic data
– testing business scenarios (forecast)
– sales breakdown or aggregates on multiple dimensions
(Time, Region, Demographics, etc)
4. OLAP Functions in Informix
• Supports subset of commonly used
OLAP functions
• Enables more efficient query
processing from BI tools such as
Cognos
5. Example query with group by
select customer_num, count(*)
from orders
where customer_num <= 110
group by customer_num;
customer_num (count(*))
101 1
104 4
106 2
110 2
4 row(s) retrieved.
6. Example query with OLAP function
select customer_num, ship_date, ship_charge,
count(*) over (partition by customer_num)
from orders
where customer_num <= 110;
customer_num ship_date ship_charge (count(*))
101 05/26/2008 $15.30 1
104 05/23/2008 $10.80 4
104 07/03/2008 $5.00 4
104 06/01/2008 $10.00 4
104 07/10/2008 $12.20 4
106 05/30/2008 $19.20 2
106 07/03/2008 $12.30 2
110 07/06/2008 $13.80 2
110 07/16/2008 $6.30 2
9 row(s) retrieved.
7. Where does OLAP function fit?
Joins, group by,
having,
aggregation
OLAP functions
Final order by
8. OLAP function as predicates
• Use derived table query block to compute
OLAP function first
select * from
(select customer_num, ship_date,
ship_charge,
count(*) over (partition by
customer_num) as cnt
from orders
where customer_num <= 110)
where cnt >= 3;
9. OLAP function example
• Running 3-month average sales for a
particular product during a particular period
select product_name,
avg(sales) over (
partition by region
order by year, month
rows between 1 preceding and 1 following
)
from total_sales
where product_id = 105
and year between 2001 and 2010;
10. The over() Clause
olap_func(arg) over(partition by clause
order by clause window frame clause)
• Defines the “domain” of OLAP function
calculation
– partition by: divide into partitions
– order by: ordering within each partition
– window frame: sliding window within each partition
– all clauses optional
11. Partition By
sum(x) over (
partition by a, b
order by c, d
rows between 2 preceding and 2 following)
a=1, b=1
a=2, b=2
a=1, b=2
a=2, b=1
12. Order By
sum(x) over (
partition by a, b
order by c, d
rows between 2 preceding and 2 following)
partition a=1, b=2
c=1,d=1
c=1,d=2
c=1,d=3
c=2,d=2
c=2,d=4
c=3,d=1
c=4,d=1
c=4,d=2
14. Partition By
• Divide result set of query into partitions for
computing of an OLAP function
• If partition by clause is not specified, then
entire result set is a single partition
max(salary) over (partition by dept_id)
sum(sales) over (partition by region)
avg(price) over ()
15. Order By
• Ordering within each partition
• Required for some OLAP functions
–ranking, window frame clause
• Support ASC/DESC, NULLS FIRST/NULLS LAST
rank() over (partition by dept
order by salary desc)
dense_rank() over(order by total_sales
nulls last)
16. Window Frame
• Defines a sliding window within a partition
• OLAP function value computed from rows in the
sliding window
• Order by clause is required
17. Physical vs. Logical Window Frame
• Physical window frame
– ROWS keyword
– count offset by position
– fixed window size
– order by one or more column expressions
• Logical window frame
– RANGE keyword
– count offset by value
– window size may vary
– order by single column (numeric, date or datetime type)
18. Window Frame Examples
avg(price) over (order by year, day
rows between 6 preceding and current row)
count(*) over (order by ship_date
range between 2 preceding and 2
following)
• Current row can be physically outside the window
avg(sales) over (order by month
range between 3 preceding and 1
preceding)
sum(sales) over (order by month
rows between 2 following and 5 following)
19. Order By – Special Semantics
• “cumulative” semantics in absence of window
frame clause
– for OLAP function that allows window frame clause
– equivalent to “ROWS between unbounded preceding
and current row”
select sales, sum(sales) over (order by quarter)
from sales where year = 2012
sales (sum)
120 120
135 255
127 382
153 535
21. Ranking Functions
• Partition by clause is optional
• Order by clause is required
• Window frame clause is NOT allowed
• Duplicate value handling is different between
rank() and dense_rank()
– same rank given to all duplicates
– next rank used “skips” ranks already covered by duplicates
in rank(), but uses next rank for dense_rank()
22. RANK vs DENSE_RANK
select emp_num, sales,
rank() over (order by sales) as rank,
dense_rank() over (order by sales) as dense_rank
from sales;
emp_num sales rank dense_rank
101 2,000 1 1
102 2,400 2 2
103 2,400 2 2
104 2,500 4 3
105 2,500 4 3
106 2,650 6 4
23. PERCENT_RANK and CUME_DIST
• Calculates ranking information as a percentile
• Returns value between 0 and 1
select emp_num, sales,
percent_rank() over (order by sales) as per_rank,
cume_dist() over (order by sales) as cume_dist
from sales;
emp_num sales per_rank cume_dist
101 2,000 0 0.166666667
102 2,400 0.2 0.500000000
103 2,400 0.2 0.500000000
104 2,500 0.6 0.833333333
105 2,500 0.6 0.833333333
106 2,650 1.0 1.000000000
24. NTILE
• Divides the ordered data set into N
number of tiles indicated by the
expression.
• Number of tiles needs to be exact
numeric with scale zero
25. NTILE Example
select name, salary,
ntile(5) over (partition by dept order by salary)
from employee;
name salary (ntile)
John 35,000 1
Jack 38,400 1
Julie 41,200 2
Manny 45,600 2
Nancy 47,300 3
Pat 49,500 4
Ray 51,300 5
26. LEAD and LAG
LEAD(expr, offset, default)
LAG(expr, offset, default)
Gives LEAD/LAG value of the expression at the
specified offset
offset is optional, default to 1 if not specified
default is optional, NULL if not specified
• default used when offset goes beyond current partition
boundary
NULL handling
RESPECT NULLS (default)
IGNORE NULLS
27. LEAD/LAG Example
select name, salary, lag(salary)
over (partition by dept order by salary),
lead(salary, 1, 0)
over (partition by dept order by salary)
from employee;
name salary (lag) (lead)
John 35,000 38,400
Jack 38,400 35,000 41,200
Julie 41,200 38,400 45,600
Manny 45,600 41,200 47,300
Nancy 47,300 45,600 49,500
Pat 49,500 47,300 51,300
Ray 51,300 49,500 0
28. LEAD/LAG NULL handling
select price,
lag(price ignore nulls, 1) over (order by day),
lead(price, 1) ignore nulls over (order by day)
from stock_price;
price (lag) (lead)
18.25 18.37
18.37 18.25 19.03
18.37 19.03
18.37 19.03
19.03 18.37 18.59
18.59 19.03 18.21
18.21 18.59
29. Numbering Functions
• Partition by clause and order by clause are
optional
• Window frame clause is NOT allowed
• Provides sequential row number to result set
– regardless of duplicates when order by is specified
30. ROW_NUMBER Example
select row_number() over (order by sales),
emp_num, sales
from sales;
(row_number) emp_num sales
1 101 2,000
2 102 2,400
3 103 2,400
4 104 2,500
5 105 2,500
6 106 2,650
31. Aggregate Functions
• Partition by, order by and window frame
clauses are all optional
– window frame clause requires order by clause
• All currently supported aggregate functions
– SUM, COUNT, MIN, MAX, AVG, STDEV, RANGE, VARIANCE
• New aggregate functions
– FIRST_VALUE/LAST_VALUE
– RATIO_TO_REPORT
32. Aggregate Function Example
select price,
avg(price) over (order by day
rows between 1 preceding and 1 following)
from stock_price;
price (avg)
18.25 18.31
18.37 18.31
18.37
19.03
19.03 18.81
18.59 18.61
18.21 18.40
33. DISTINCT handling
• DISTINCT is supported, however DISTINCT is mutually
exclusive with order by clause or window frame
clause
select emp_id, manager_id,
count(distinct manager_id)
over (partition by department)
from employee;
emp_id manager_id (count)
101 103 3
102 103 3
103 100 3
104 110 3
105 110 3
34. FIRST_VALUE and LAST_VALUE
• Gives FIRST/LAST value of current partition
• NULL handling
– RESPECT NULLS (default)
– IGNORE NULLS
35. FIRST_VALUE/LAST_VALUE Example
select price, price – first_value(price)
over (partition by year order by day)
as diff_price
from stock_price;
price diff_price
18.25 0
18.37 0.12
19.03 0.78
18.59 0.34
18.21 -0.04
36. RATIO_TO_REPORT
• Computes the ratio of current value to
sum of all values in current partition or
window frame.
select emp_num, sales,
ratio_to_report(sales) over (partition by
year order by sales)
from sales;
37. RATIO_TO_REPORT Example
select year, sales, ratio_to_report(sales)
over (partition by year)
from sales;
year sales (ratio_to_report)
1998 2400 0.2308
1998 2550 0.2452
1998 2650 0.2548
1998 2800 0.2692
1999 2450 0.2311
1999 2575 0.2429
1999 2725 0.2571
1999 2850 0.2689
38. Nested OLAP Functions
• OLAP function can be nested inside another
OLAP function
select emp_id, salary, salary – first_value(salary)
over (order by rank() over (order by salary))
as diff_salary
from employee;
select sum(ntile(10) over (order by salary))
over (partition by department)
from employee;
39. OLAP functions and IWA
• Queries containing OLAP functions can be
accelerated by Informix Warehouse
Accelerator (IWA)
• IWA processes majority of the query block
– scan, join, group by, having, aggregation
• Informix server processes OLAP functions
based on query result from IWA
40. References
• Links to OLAP function in Informix 12.1
documentation
http://pic.dhe.ibm.com/infocenter/informix/v121/inde
x.jsp?topic=%2Fcom.ibm.sqls.doc
%2Fids_sqs_2583.htm
http://pic.dhe.ibm.com/infocenter/informix/v121/inde
x.jsp?topic=%2Fcom.ibm.acc.doc
%2Fids_acc_queries1.htm