This document discusses using UNPIVOT, PIVOT and GROUP BY extensions in SQL to transform and summarize data in various ways. Specifically, it shows how to:
1) Use UNPIVOT to transform columns into rows and PIVOT to transform rows into columns.
2) Use GROUP BY with ROLLUP, CUBE and GROUPING SETS functions to generate subtotals and totals across multiple levels or dimensions of data.
3) Apply techniques like UNPIVOT, PIVOT and GROUP BY to real-world sales data to transform it into a spreadsheet-like format with rows, columns, subtotals and totals.
The document discusses using Oracle SQL functions like UNPIVOT, PIVOT, and GROUP BY extensions to transform and summarize data in different ways. It provides examples of using these functions to transpose columns and rows, calculate subtotals and grand totals, and generate spreadsheet-like reports from sales data with multiple grouping levels. The techniques shown allow flexible reshaping and analysis of transactional data in the database.
Make your data dance: PIVOT and GROUP BY in Oracle SQLstewashton
油
This document summarizes a presentation titled "Make your Data Dance: UNPIVOT, PIVOT and GROUP BY Extensions" given by Stew Ashton at the DOAG 2018 conference. The presentation demonstrates how to use the UNPIVOT, PIVOT, and GROUP BY clauses in SQL to transform data between row-column formats, calculate subtotals and grand totals, and generate spreadsheet-like reports from transactional data. Examples using sales data illustrate techniques for pivoting, transposing, and grouping data at multiple levels to provide summary views.
The document discusses new features in PostgreSQL that help with creating simple sharding schemes. It describes how PostgreSQL implements partitioning via table inheritance and declarative partitioning. It also discusses how the foreign data wrapper (FDW) feature can be used with partitioning to implement sharding across multiple servers. The document notes improvements in PostgreSQL version 11 for declarative partitioning and optimization features for the postgres_fdw extension such as predicate pushdown and join pushdown to remote servers.
This document contains Matlab code that analyzes the power of an RCL circuit. It defines the state space matrices A, B, C, D for the circuit and converts it to a transfer function G. It then uses this transfer function to simulate the step response, impulse response, and response to a sawtooth input signal of the circuit over time.
This document provides instructions and examples for various land surveying programs that can be run on a Casio fx-5800P calculator. It includes 22 programs for calculations such as radial bearing and distance between coordinates, point to point easting and northing, intersections by coordinates, bearings, angles, reference lines, chainage and offset, angles, and more. For each program there is an introduction, example with diagram, inputs required, and outputs provided.
The document discusses combinational circuits and components. It covers topics like magnitude comparators, adders, multiplexers, and how they can be implemented using logic gates. Specifically, it provides examples of a 4-bit magnitude comparator and 4-bit ripple carry adder. It also discusses the design and truth table of a 2-to-1 multiplexer. Project 2 details are announced which involves designing eight logic functions.
This document summarizes key concepts from Day 4 of an R bootcamp, including:
- Using qplot() and ggplot() to create basic scatterplots and add elements like titles, colors, and smoothing lines
- The structure of ggplot2 graphs using data, aesthetics, geometries, scales, and other elements
- Techniques for dealing with overplotting like jittering, binning, and faceting
- Customizing graphs using themes, color palettes, and different coordinate systems
- Recreating an example of Minard's graph showing Napoleon's 1812 march and losses using ggplot2
1) The document describes 5 assembly language programs: a program to exchange two 16-bit numbers, a program to add or subtract two 8-bit numbers, a program to add two 16-bit numbers, a program to subtract two 16-bit numbers where X is greater than Y, and a program to add two N-byte numbers.
2) Each program includes the hexadecimal code, labels, mnemonics, and comments for each line of code. Input and output values are provided as examples for some of the programs.
3) The programs demonstrate various assembly language instructions for loading data, performing arithmetic operations, storing results, and conditional/unconditional jumps.
Aggregate functions operate on a collection of values from a column and return a single value. The main aggregate functions are SUM, AVG, MIN, MAX, and COUNT. COUNT returns the number of rows, SUM adds values, AVG calculates the average, MIN returns the minimum value, and MAX returns the maximum value. The GROUP BY clause groups data by one or more columns and the HAVING clause allows filtering groups based on aggregate functions.
This document discusses cube, rollup and materialized views in Oracle databases. It provides an overview of how cube and rollup extend the GROUP BY clause to automatically calculate subtotals and totals. It also discusses how materialized views can store the results of a query to improve performance for frequent or complex queries. The document includes examples demonstrating how to use cube, rollup, and materialized views.
This document contains a log of questions and answers related to SQL queries on sample tables. It includes 12 questions on topics like selecting data, filtering results, aggregation, joins and updates. The questions involve writing queries on tables for employees, departments, items and transactions to retrieve, calculate and update stored data.
Latin America Tour 2019 - 10 great sql featuresConnor McDonald
油
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Use of Oracle SQL to twist data around - unpivot columns to rows, pivot rows to columns, parse delimited strings to columns and rows, turn rows into delimited strings. Presentation given at OUGN Spring Conference 2016.
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionament...rcmoutinho
油
Acesso ao banco 辿 cr鱈tico nos projetos. f叩cil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informa巽達o, ou se por uma consulta mal feita!
Um agravante neste situa巽達o: como testar em cen叩rios pr坦ximos ao real e de forma produtiva? Nesta palestra voc棚 vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e tamb辿m como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionament...rcmoutinho
油
Acesso ao banco 辿 cr鱈tico nos projetos. f叩cil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informa巽達o, ou se uma consulta for mal planejada!
Um agravante nesta situa巽達o: como testar em cen叩rios pr坦ximos ao real e de forma produtiva? Nesta palestra voc棚 vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e tamb辿m como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
This document discusses various SQL concepts including the LIKE operator, TOP clause, UNION vs UNION ALL, IN operator, aggregation functions, GROUP BY clause, HAVING clause, and the difference between HAVING and WHERE. It provides examples of queries using these concepts on sample tables and explains the purpose and syntax of each concept. Quizzes with sample queries and answers are also included.
This document discusses movement types in Materials Management and Inventory Management (MM-IM) in SAP. It defines movement types, explains how they influence goods movements and valuations, and describes the key tables that define movement types. Movement types determine stock and value updates, screen layouts, and more. The document provides examples of common movement type configurations.
Case Study 3 Production Cost Perfect Comp Answer Sheet - newKayla Davenport
油
This document provides a case study with instructions to analyze production, costs, and market equilibrium under perfect competition across the short run and long run. Key results include:
- In the short run, the market equilibrium price is $735.29 and quantity is 29.42. Individual firms earn positive profits.
- In the long run, entry and exit of firms will occur until the number adjusts so that price equals minimum average total cost for firms. Profits are driven to zero.
- Graphs are used to illustrate the short run and long run equilibrium outcomes for individual firms and the overall market.
This document provides instructions and exercises for an assignment on database development. It includes sample tables for employees and departments with sample data. It then lists a series of exercises involving writing SQL statements to retrieve, manipulate, and group data from the sample tables. The exercises cover basic SELECT statements, filtering with WHERE, sorting with ORDER BY, aggregation with GROUP BY, and data modification using INSERT, UPDATE, DELETE statements.
The document contains pie charts showing the percentage breakdown of a country's total exports and export revenues by item. It states that one pie chart shows the quantity of each exported item as a percentage of total exports, while the other pie chart shows the revenue generated from each export item as a percentage of total export revenues. The reader is asked to determine the item that generates the maximum percentage change in revenue between the two pie charts.
Abstract: The session will breakdown the Model clause into its fundamental components and provides some basic real-world examples to demonstrate its greater potential.
Though most developers have heard of the SQL Model clause in 10g, many may baulk at the idea of using it - daunted by seemingly foreign syntax that might well have come out of a FORTRAN program.
Look a little closer and you'll find it's just like building a spreadsheet. Concise, easy to read syntax that provides the functionality for demanding calculations that would normally require elaborate joins, unions, analytics or PL/SQL. In addition to the development and maintenance burden, we are also faced with the all too familiar problem of business customers duplicating data to an Excel spreadsheet that is shared and erroneously modified around the workplace.
This session uses the Model clause as a high performance tool that can simplify approaches to every day problems. It demonstrates that Model is an extension to SQL that forms multi-dimensional arrays with inter-row & inter-array calculations that automatically resolves formula dependencies.
The document describes instructions related to input/output, stack operations, and machine control for the 8085 microprocessor. It provides examples of programs for 8-bit division and calculating the square of a number using a lookup table. The division program uses subtraction and increment operations to repeatedly divide the dividend by the divisor until the remainder is obtained. The square program uses the lookup table at address 26H to find the square of the data in register L and store it in memory.
This document summarizes Stew Ashton's presentation on using Oracle Database 12c's MATCH_RECOGNIZE clause to solve various "row pattern matching" problems in a more efficient way than pre-12c solutions. The document provides examples of using MATCH_RECOGNIZE for problems involving identifying consecutive values, grouping data into fixed bins, and distributing values evenly across bins. It shows that MATCH_RECOGNIZE offers performance improvements and simpler solutions compared to earlier approaches using window functions, self-joins and the MODEL clause.
This document provides information on calculator techniques for mathematics and statistics. It discusses how to clear memory, convert between degrees, radians and gradian, evaluate functions and derivatives, solve equations, work with complex numbers, vectors and forces, and calculate mean and standard deviation. Instructions are given for common calculations as well as past exam questions.
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Single-row functions can manipulate data items, accept arguments and return one value, and act on each row returned. There are various types of single-row functions including character, number, date, and conversion functions. Character functions manipulate character strings, number functions perform calculations, and date functions modify date formats. Functions allow data to be formatted, calculated, and converted as needed for different queries and outputs.
Oren nakdimon oh really... i didn't know it is supported in standard editionOren Nakdimon
油
As Oracle Standard Edition developers, we tend to complain about the features that we don't have. But at the same time, there are good and useful features that are supported in Standard Edition but many developers either don't know about them or assume they are supported only in Enterprise Edition.
This session focuses on such features - introducing them, exploring them, showing when they are useful and how to use them.
UiPath Document Understanding - Generative AI and Active learning capabilitiesDianaGray10
油
This session focus on Generative AI features and Active learning modern experience with Document understanding.
Topics Covered:
Overview of Document Understanding
How Generative Annotation works?
What is Generative Classification?
How to use Generative Extraction activities?
What is Generative Validation?
How Active learning modern experience accelerate model training?
Q/A
If you have any questions or feedback, please refer to the "Women in Automation 2025" dedicated Forum thread. You can find there extra details and updates.
Aggregate functions operate on a collection of values from a column and return a single value. The main aggregate functions are SUM, AVG, MIN, MAX, and COUNT. COUNT returns the number of rows, SUM adds values, AVG calculates the average, MIN returns the minimum value, and MAX returns the maximum value. The GROUP BY clause groups data by one or more columns and the HAVING clause allows filtering groups based on aggregate functions.
This document discusses cube, rollup and materialized views in Oracle databases. It provides an overview of how cube and rollup extend the GROUP BY clause to automatically calculate subtotals and totals. It also discusses how materialized views can store the results of a query to improve performance for frequent or complex queries. The document includes examples demonstrating how to use cube, rollup, and materialized views.
This document contains a log of questions and answers related to SQL queries on sample tables. It includes 12 questions on topics like selecting data, filtering results, aggregation, joins and updates. The questions involve writing queries on tables for employees, departments, items and transactions to retrieve, calculate and update stored data.
Latin America Tour 2019 - 10 great sql featuresConnor McDonald
油
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Use of Oracle SQL to twist data around - unpivot columns to rows, pivot rows to columns, parse delimited strings to columns and rows, turn rows into delimited strings. Presentation given at OUGN Spring Conference 2016.
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionament...rcmoutinho
油
Acesso ao banco 辿 cr鱈tico nos projetos. f叩cil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informa巽達o, ou se por uma consulta mal feita!
Um agravante neste situa巽達o: como testar em cen叩rios pr坦ximos ao real e de forma produtiva? Nesta palestra voc棚 vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e tamb辿m como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionament...rcmoutinho
油
Acesso ao banco 辿 cr鱈tico nos projetos. f叩cil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informa巽達o, ou se uma consulta for mal planejada!
Um agravante nesta situa巽達o: como testar em cen叩rios pr坦ximos ao real e de forma produtiva? Nesta palestra voc棚 vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e tamb辿m como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
This document discusses various SQL concepts including the LIKE operator, TOP clause, UNION vs UNION ALL, IN operator, aggregation functions, GROUP BY clause, HAVING clause, and the difference between HAVING and WHERE. It provides examples of queries using these concepts on sample tables and explains the purpose and syntax of each concept. Quizzes with sample queries and answers are also included.
This document discusses movement types in Materials Management and Inventory Management (MM-IM) in SAP. It defines movement types, explains how they influence goods movements and valuations, and describes the key tables that define movement types. Movement types determine stock and value updates, screen layouts, and more. The document provides examples of common movement type configurations.
Case Study 3 Production Cost Perfect Comp Answer Sheet - newKayla Davenport
油
This document provides a case study with instructions to analyze production, costs, and market equilibrium under perfect competition across the short run and long run. Key results include:
- In the short run, the market equilibrium price is $735.29 and quantity is 29.42. Individual firms earn positive profits.
- In the long run, entry and exit of firms will occur until the number adjusts so that price equals minimum average total cost for firms. Profits are driven to zero.
- Graphs are used to illustrate the short run and long run equilibrium outcomes for individual firms and the overall market.
This document provides instructions and exercises for an assignment on database development. It includes sample tables for employees and departments with sample data. It then lists a series of exercises involving writing SQL statements to retrieve, manipulate, and group data from the sample tables. The exercises cover basic SELECT statements, filtering with WHERE, sorting with ORDER BY, aggregation with GROUP BY, and data modification using INSERT, UPDATE, DELETE statements.
The document contains pie charts showing the percentage breakdown of a country's total exports and export revenues by item. It states that one pie chart shows the quantity of each exported item as a percentage of total exports, while the other pie chart shows the revenue generated from each export item as a percentage of total export revenues. The reader is asked to determine the item that generates the maximum percentage change in revenue between the two pie charts.
Abstract: The session will breakdown the Model clause into its fundamental components and provides some basic real-world examples to demonstrate its greater potential.
Though most developers have heard of the SQL Model clause in 10g, many may baulk at the idea of using it - daunted by seemingly foreign syntax that might well have come out of a FORTRAN program.
Look a little closer and you'll find it's just like building a spreadsheet. Concise, easy to read syntax that provides the functionality for demanding calculations that would normally require elaborate joins, unions, analytics or PL/SQL. In addition to the development and maintenance burden, we are also faced with the all too familiar problem of business customers duplicating data to an Excel spreadsheet that is shared and erroneously modified around the workplace.
This session uses the Model clause as a high performance tool that can simplify approaches to every day problems. It demonstrates that Model is an extension to SQL that forms multi-dimensional arrays with inter-row & inter-array calculations that automatically resolves formula dependencies.
The document describes instructions related to input/output, stack operations, and machine control for the 8085 microprocessor. It provides examples of programs for 8-bit division and calculating the square of a number using a lookup table. The division program uses subtraction and increment operations to repeatedly divide the dividend by the divisor until the remainder is obtained. The square program uses the lookup table at address 26H to find the square of the data in register L and store it in memory.
This document summarizes Stew Ashton's presentation on using Oracle Database 12c's MATCH_RECOGNIZE clause to solve various "row pattern matching" problems in a more efficient way than pre-12c solutions. The document provides examples of using MATCH_RECOGNIZE for problems involving identifying consecutive values, grouping data into fixed bins, and distributing values evenly across bins. It shows that MATCH_RECOGNIZE offers performance improvements and simpler solutions compared to earlier approaches using window functions, self-joins and the MODEL clause.
This document provides information on calculator techniques for mathematics and statistics. It discusses how to clear memory, convert between degrees, radians and gradian, evaluate functions and derivatives, solve equations, work with complex numbers, vectors and forces, and calculate mean and standard deviation. Instructions are given for common calculations as well as past exam questions.
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Single-row functions can manipulate data items, accept arguments and return one value, and act on each row returned. There are various types of single-row functions including character, number, date, and conversion functions. Character functions manipulate character strings, number functions perform calculations, and date functions modify date formats. Functions allow data to be formatted, calculated, and converted as needed for different queries and outputs.
Oren nakdimon oh really... i didn't know it is supported in standard editionOren Nakdimon
油
As Oracle Standard Edition developers, we tend to complain about the features that we don't have. But at the same time, there are good and useful features that are supported in Standard Edition but many developers either don't know about them or assume they are supported only in Enterprise Edition.
This session focuses on such features - introducing them, exploring them, showing when they are useful and how to use them.
UiPath Document Understanding - Generative AI and Active learning capabilitiesDianaGray10
油
This session focus on Generative AI features and Active learning modern experience with Document understanding.
Topics Covered:
Overview of Document Understanding
How Generative Annotation works?
What is Generative Classification?
How to use Generative Extraction activities?
What is Generative Validation?
How Active learning modern experience accelerate model training?
Q/A
If you have any questions or feedback, please refer to the "Women in Automation 2025" dedicated Forum thread. You can find there extra details and updates.
Technology use over time and its impact on consumers and businesses.pptxkaylagaze
油
In this presentation, I will discuss how technology has changed consumer behaviour and its impact on consumers and businesses. I will focus on internet access, digital devices, how customers search for information and what they buy online, video consumption, and lastly consumer trends.
World Information Architecture Day 2025 - UX at a CrossroadsJoshua Randall
油
User Experience stands at a crossroads: will we live up to our potential to design a better world? or will we be co-opted by product management or another business buzzword?
Looking backwards, this talk will show how UX has repeatedly failed to create a better world, drawing on industry data from Nielsen Norman Group, Baymard, MeasuringU, WebAIM, and others.
Looking forwards, this talk will argue that UX must resist hype, say no more often and collaborate less often (you read that right), and become a true profession in order to be able to design a better world.
UiPath Automation Developer Associate Training Series 2025 - Session 2DianaGray10
油
In session 2, we will introduce you to Data manipulation in UiPath Studio.
Topics covered:
Data Manipulation
What is Data Manipulation
Strings
Lists
Dictionaries
RegEx Builder
Date and Time
Required Self-Paced Learning for this session:
Data Manipulation with Strings in UiPath Studio (v2022.10) 2 modules - 1h 30m - https://academy.uipath.com/courses/data-manipulation-with-strings-in-studio
Data Manipulation with Lists and Dictionaries in UiPath Studio (v2022.10) 2 modules - 1h - https:/academy.uipath.com/courses/data-manipulation-with-lists-and-dictionaries-in-studio
Data Manipulation with Data Tables in UiPath Studio (v2022.10) 2 modules - 1h 30m - https:/academy.uipath.com/courses/data-manipulation-with-data-tables-in-studio
鏝 For any questions you may have, please use the dedicated Forum thread. You can tag the hosts and mentors directly and they will reply as soon as possible.
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...ScyllaDB
油
This talk shares how Discord scaled their message search infrastructure using Rust, Kubernetes, and a multi-cluster Elasticsearch architecture to achieve better performance, operability, and reliability, while also enabling new search features for Discord users.
DevNexus - Building 10x Development Organizations.pdfJustin Reock
油
Developer Experience is Dead! Long Live Developer Experience!
In this keynote-style session, well take a detailed, granular look at the barriers to productivity developers face today and modern approaches for removing them. 10x developers may be a myth, but 10x organizations are very real, as proven by the influential study performed in the 1980s, The Coding War Games.
Right now, here in early 2025, we seem to be experiencing YAPP (Yet Another Productivity Philosophy), and that philosophy is converging on developer experience. It seems that with every new method, we invent to deliver products, whether physical or virtual, we reinvent productivity philosophies to go alongside them.
But which of these approaches works? DORA? SPACE? DevEx? What should we invest in and create urgency behind today so we dont have the same discussion again in a decade?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraScyllaDB
油
Learn how Responsive replaced embedded RocksDB with ScyllaDB in Kafka Streams, simplifying the architecture and unlocking massive availability and scale. The talk covers unbundling stream processors, key ScyllaDB features tested, and lessons learned from the transition.
TrustArc Webinar - Building your DPIA/PIA Program: Best Practices & TipsTrustArc
油
Understanding DPIA/PIAs and how to implement them can be the key to embedding privacy in the heart of your organization as well as achieving compliance with multiple data protection / privacy laws, such as GDPR and CCPA. Indeed, the GDPR mandates Privacy by Design and requires documented Data Protection Impact Assessments (DPIAs) for high risk processing and the EU AI Act requires an assessment of fundamental rights.
How can you build this into a sustainable program across your business? What are the similarities and differences between PIAs and DPIAs? What are the best practices for integrating PIAs/DPIAs into your data privacy processes?
Whether you're refining your compliance framework or looking to enhance your PIA/DPIA execution, this session will provide actionable insights and strategies to ensure your organization meets the highest standards of data protection.
Join our panel of privacy experts as we explore:
- DPIA & PIA best practices
- Key regulatory requirements for conducting PIAs and DPIAs
- How to identify and mitigate data privacy risks through comprehensive assessments
- Strategies for ensuring documentation and compliance are robust and defensible
- Real-world case studies that highlight common pitfalls and practical solutions
UiPath Automation Developer Associate Training Series 2025 - Session 1DianaGray10
油
Welcome to UiPath Automation Developer Associate Training Series 2025 - Session 1.
In this session, we will cover the following topics:
Introduction to RPA & UiPath Studio
Overview of RPA and its applications
Introduction to UiPath Studio
Variables & Data Types
Control Flows
You are requested to finish the following self-paced training for this session:
Variables, Constants and Arguments in Studio 2 modules - 1h 30m - https://academy.uipath.com/courses/variables-constants-and-arguments-in-studio
Control Flow in Studio 2 modules - 2h 15m - https:/academy.uipath.com/courses/control-flow-in-studio
鏝 For any questions you may have, please use the dedicated Forum thread. You can tag the hosts and mentors directly and they will reply as soon as possible.
Understanding Traditional AI with Custom Vision & MuleSoft.pptxshyamraj55
油
Understanding Traditional AI with Custom Vision & MuleSoft.pptx | ### 際際滷 Deck Description:
This presentation features Atul, a Senior Solution Architect at NTT DATA, sharing his journey into traditional AI using Azure's Custom Vision tool. He discusses how AI mimics human thinking and reasoning, differentiates between predictive and generative AI, and demonstrates a real-world use case. The session covers the step-by-step process of creating and training an AI model for image classification and object detectionspecifically, an ad display that adapts based on the viewer's gender. Atulavan highlights the ease of implementation without deep software or programming expertise. The presentation concludes with a Q&A session addressing technical and privacy concerns.
Technology use over time and its impact on consumers and businesses.pptxkaylagaze
油
In this presentation, I explore how technology has changed consumer behaviour and its impact on consumers and businesses. I will focus on internet access, digital devices, how customers search for information and what they buy online, video consumption, and lastly consumer trends.
FinTech - US Annual Funding Report - 2024.pptxTracxn
油
US FinTech 2024, offering a comprehensive analysis of key trends, funding activities, and top-performing sectors that shaped the FinTech ecosystem in the US 2024. The report delivers detailed data and insights into the region's funding landscape and other developments. We believe this report will provide you with valuable insights to understand the evolving market dynamics.
DealBook of Ukraine: 2025 edition | AVentures CapitalYevgen Sysoyev
油
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2024 and the first deals of 2025.
Computational Photography: How Technology is Changing Way We Capture the WorldHusseinMalikMammadli
油
Computational Photography (Computer Vision/Image): How Technology is Changing the Way We Capture the World
He巽 d端端nm端s端n端zm端, m端asir smartfonlar v kameralar nec bu qdr g旦zl g旦r端nt端lr yarad脹r? Bunun sirri Computational Fotoqrafiyas脹nda(Computer Vision/Imaging) gizlidirkillri 巽km v emal etm 端sulumuzu tkmilldirn, komp端ter elmi il fotoqrafiyan脹n inqilabi birlmsi.
Computational Photography: How Technology is Changing Way We Capture the WorldHusseinMalikMammadli
油
Make your data dance: PIVOT, UNPIVOT & GROUP BY extensions
1. Make your Data Dance
UNPIVOT, PIVOT and GROUP BY Extensions
Stew Ashton
UKOUG Techfest 2019
Can you read the following line? If not, please move closer.
It's much better when you can read the code ;)
2. Who am I?
1981-2015:
Developer / application architect
From Mainframe to client / server to Web
2005-present: focus on Oracle DB development
Advocate of data-centric application architecture
Contribute to asktom & ODC/OTN SQL forum
Presented at OOW, conferences, meetups
2
3. Data with Subtotals?
REGION COUNTRY CUSTOMER SALE_DATE QTY AMOUNT
Europe DE Raina Silverberg 2017-01-23 2 110
Europe DE Raina Silverberg 2017-02-19 3 220
3
Europe DE Gloria Saintclair 2017-01-27 2 140
Europe DE Gloria Saintclair 2017-02-26 3 280
Europe DE Gloria Saintclair (Subtotal) 5 420
Europe DE Gloria Saintclair 2017-01-27 2 140
Europe DE Gloria Saintclair 2017-02-26 3 280
Europe DE Raina Silverberg (Subtotal) 5 330
4. Totals and Grand Total?
REGION COUNTRY CUSTOMER SALE_DATE QTY AMOUNT
Europe DE Raina Silverberg 2017-01-23 2 110
Europe DE Raina Silverberg 2017-02-19 3 220
4
Europe DE Gloria Saintclair 2017-01-27 2 140
Europe DE Gloria Saintclair 2017-02-26 3 280
Europe DE Raina Silverberg (Subtotal) 5 330
Europe DE Gloria Saintclair (Subtotal) 5 420
Europe DE (Subtotal) 10 750
Europe (Total) 10 750
(Grand total) 10 750
5. Columns to Rows?
5
A C
1A
2A
1
2
3A3
4
5
6
1B
2B
3B
7
8
9
1C
2C
3C
B
1B
2B
3B
1C
2C
3C
6. Rows to Columns?
6
A C
1A
2A
1
2
3A3
4
5
6
4A
5A
6A
7
8
9
7A
8A
9A
B
4A
5A
6A
7A
8A
9A
9. How?
UNPIVOT columns to rows
PIVOT rows to columns
GROUP BY extensions
ROLLUP
CUBE
GROUPING SETS
GROUPING_ID() and GROUPING() functions
9
10. UNPIVOT: columns to rows
10
KEY COL VAL
1 A 1A
KEY A B
1 1A 1B
1 B 1B
1
with data(KEY,A,B) as (
select 1, '1A', '1B' from dual
)
select * from data
unpivot(VAL for COL in(A,B));
KEY A B
1 1A 1B1
Metadata becomes data
11. KEYKEY 'A' 'B'
1A 1B1
PIVOT: rows to columns
11
KEY COL VAL
1 A 1A
1 B 1B
select * from data
unpivot(VAL for COL in(A,B));
pivot(max(VAL) for COL in('A','B')); Data becomes metadata
1 C 1C
Only listed COL values produce output
12. KEY A_N A_V
1 VA1
Multiple Columns
12
select * from data
unpivot((N, V) for COL in ((A_N, A_V) as 'A',(B_N, B_V) as 'B'))
pivot( max(N) as N, max(V) as V for COL in ('A' as A,'B' as B));
B_N B_V
2 VB
KEY COL N
A 11
V
VA
B 21 VB
1
Round trip!
13. KEY
1 VA1
PIVOT generates column names
13
pivot(
max(N) as N, max(V) as V
for COL in ('A' as A,'B' as B)
);
A_N A_V B_N B_V
2 VB1
A N A V B N B VA N A V B N B V
15. Matrix: rotate!
15
A C
1A
2A
1
2
3A3
B
1B
2B
3B
1C
2C
3C
with normalized as (
select k r, c, v from t
unpivot(v for c in(
a as 1,b as 2,c as 3
))
)
, rotated as (
select 4-c r, r c, v
from normalized
)
select * from rotated
pivot(max(v) for c in(1,2,3))
order by r;
Normalize to cells (row, column, value),
rotate, display
16. Grouping Sales History
2 regions
2 countries per region
2 customers per country
2 years
2 sales per year per customer
16
21. 21
select region, country,
sum(amount) amount
from sales_yr
group by grouping sets (
(),
region,
(region, country)
);
REGION COUNTRY AMOUNT
Europe DE 1500
Europe FR 7140
Europe 8640
Americas CA 8820
Americas US 900
Americas 9720
18360
What if I want 3 levels?
22. 22
select region, country,
sum(amount) amount
from sales_yr
group by rollup(region, country);
REGION COUNTRY AMOUNT
Europe DE 1500
Europe FR 7140
Europe 8640
Americas CA 8820
Americas US 900
Americas 9720
18360
23. 23
select region, country,
sum(amount) amount
from sales_yr
group by cube(region, country);
REGION COUNTRY AMOUNT
18360
CA 8820
DE 1500
FR 7140
US 900
Europe 8640
Europe DE 1500
Europe FR 7140
Americas 9720
Americas CA 8820
Americas US 900
What if I have NULL data?
24. 24
select
region, country,
sum(amount) amount
from sales_yr
group by cube(region, country);
REGION COUNTRY AMOUNT
18360
CA 8820
DE 1500
FR 7140
US 900
Europe 8640
Europe DE 1500
Europe FR 7140
Americas 9720
Americas CA 8820
Americas US 900
25. 25
select
grouping(country) g_c,
region, country,
sum(amount) amount
from sales_yr
group by cube(region, country);
G_C REGION COUNTRY AMOUNT
1 18360
0 CA 8820
0 DE 1500
0 FR 7140
0 US 900
1 Europe 8640
0 Europe DE 1500
0 Europe FR 7140
1 Americas 9720
0 Americas CA 8820
0 Americas US 900
26. 26
select
grouping(region)*2 g_r,
grouping(country) g_c,
region, country,
sum(amount) amount
from sales_yr
group by cube(region, country);
G_R G_C REGION COUNTRY AMOUNT
2 1 18360
2 0 CA 8820
2 0 DE 1500
2 0 FR 7140
2 0 US 900
0 1 Europe 8640
0 0 Europe DE 1500
0 0 Europe FR 7140
0 1 Americas 9720
0 0 Americas CA 8820
0 0 Americas US 900
27. 27
select
grouping_id(region, country) g_rc,
grouping(region)*2 g_r,
grouping(country) g_c,
region, country,
sum(amount) amount
from sales_yr
group by cube(region, country);
G_RC G_R G_C REGION COUNTRY AMOUNT
3 2 1 18360
2 2 0 CA 8820
2 2 0 DE 1500
2 2 0 FR 7140
2 2 0 US 900
1 0 1 Europe 8640
0 0 0 Europe DE 1500
0 0 0 Europe FR 7140
1 0 1 Americas 9720
0 0 0 Americas CA 8820
0 0 0 Americas US 900
28. select * from (
select deptno, job, sal from emp
)
pivot(sum(sal) for deptno in(
10 as "10", 20 as "20", 30 as "30"
));
select deptno,
job, sum(sal) sal
from emp
group by deptno, job;
28
DEPTNO JOB SAL
10 CLERK 1300
10 MANAGER 2450
10PRESIDENT 5000
20 CLERK 1900
20 ANALYST 6000
20 MANAGER 2975
30 CLERK 950
30 MANAGER 2850
30SALESMAN 5600
JOB 10 20 30
ANALYST 6000
CLERK 1300 1900 950
MANAGER 2450 2975 2850
PRESIDENT 5000
SALESMAN 5600
SpreadSheet-like Data from EMP
29. select deptno,
job, sum(sal) sal
from emp
group by cube(deptno, job);
29
select
deptno,
job, sum(sal) sal
from emp
group by cube(deptno, job);
DEPTNO JOB SAL
29025
CLERK 4150
ANALYST 6000
MANAGER 8275
SALESMAN 5600
PRESIDENT 5000
10 8750
10 CLERK 1300
10 MANAGER 2450
10PRESIDENT 5000
20 10875
20 CLERK 1900
20 ANALYST 6000
20 MANAGER 2975
30 9400
30 CLERK 950
30 MANAGER 2850
30SALESMAN 5600
JOB 10 20 30 TOTAL
ANALYST 6000 6000
CLERK 1300 1900 950 4150
MANAGER 2450 2975 2850 8275
PRESIDENT 5000 5000
SALESMAN 5600 5600
(Total) 8750 10875 9400 29025
SpreadSheet-like Data from EMP
30. 30
select case grouping(deptno)
when 1 then -1 else deptno
end deptno,
job, sum(sal) sal
from emp
group by cube(deptno, job);
DEPTNO JOB SAL
-1 29025
-1 CLERK 4150
-1 ANALYST 6000
-1 MANAGER 8275
-1SALESMAN 5600
-1PRESIDENT 5000
10 8750
10 CLERK 1300
10 MANAGER 2450
10PRESIDENT 5000
20 10875
20 CLERK 1900
20 ANALYST 6000
20 MANAGER 2975
30 9400
30 CLERK 950
30 MANAGER 2850
30SALESMAN 5600
32. 32
select case gr_job
when 1 then '(Total)' else job
end job,
"10", "20", "30", "(Total)"
from (
select case grouping(deptno)
when 1 then -1 else deptno
end deptno,
job, sum(sal) sal,
grouping(job) gr_job
from emp
group by cube(deptno, job)
)
pivot(max(sal) for deptno in (
10, 20, 30, -1 as TOTAL
))
order by gr_job, job;
JOB 10 20 30 TOTAL
ANALYST 6000 6000
CLERK 1300 1900 950 4150
MANAGER 2450 2975 2850 8275
PRESIDENT 5000 5000
SALESMAN 5600 5600
(Total) 8750 10875 9400 29025
33. SpreadSheet-like Data from SALES
2 sums
QTY, AMOUNT
4 vertical levels
Grand total, region, country, customer
2 horizontal levels
Year, total all years
33
36. 36
select * from (
select
decode(grouping_id(REGION,COUNTRY,CUSTOMER),7,'Total',REGION) REGION,
decode(grouping_id(REGION,COUNTRY,CUSTOMER),3,'Total',COUNTRY) COUNTRY,
decode(grouping_id(REGION,COUNTRY,CUSTOMER),1,'Total',CUSTOMER) CUSTOMER,
decode(grouping(YR),1,'Total',YR) YR,
sum(QTY) QTY,
sum(AMOUNT) AMOUNT
from sales_yr
group by grouping sets(
rollup(REGION,COUNTRY,CUSTOMER,YR),
rollup(YR,REGION,COUNTRY)
)
)
pivot(max(qty) as q,max(amount) as a for (yr) in (
('2016') as "2016",
('2017') as "2017",
('Total') as "Total"
))
order by nullif(region,'Total'),nullif(country,'Total'),nullif(customer,'Total')
37. 37
REGION COUNTRY CUSTOMER 2016_Q 2016_A 2017_Q 2017_A Total_Q Total_A
Americas CA Alyce Gray 13 1530 13 1530 26 3060
Americas CA Salena Grace 21 2880 21 2880 42 5760
Americas CA (Total) 34 4410 34 4410 68 8820
Americas US Linette Ingram 3 210 3 210 6 420
Americas US Vida Puleo 3 240 3 240 6 480
Americas US (Total) 6 450 6 450 12 900
Americas (Total) 40 4860 40 4860 80 9720
Europe DE Gloria Saintclair 5 420 5 420 10 840
Europe DE Raina Silverberg 5 330 5 330 10 660
Europe DE (Total) 10 750 10 750 20 1500
Europe FR Koren Macdonald 17 2100 17 2100 34 4200
Europe FR Madelaine Gottlieb 11 1470 11 1470 22 2940
Europe FR (Total) 28 3570 28 3570 56 7140
Europe (Total) 38 4320 38 4320 76 8640
(Total) 78 9180 78 9180 156 18360
38. Make your Data Dance
UNPIVOT, PIVOT and GROUP BY Extensions
Stew Ashton
UKOUG Techfest 2019
Blog: stewashton.wordpress.com
Twitter: @stewashton
/search/slideshow?&q=stewashton
40. 40
OBJ_ID F T
C 1(null)
C 25
C 34
O 13
O 24
O 5(null)
select * from range_input
41. 41
select * from range_input
unpivot (
F for FT in (F as 1, T as -1)
)
OBJ_ID FT F
C 11
C 12
C -15
C 13
C -14
O 11
O -13
O 12
O -14
O 15
OBJ_ID F T
C 1(null)
C 25
C 34
O 13
O 24
O 5(null)
42. 42
select * from range_input
unpivot include nulls (
F for FT in (F as 1, T as -1)
)
OBJ_ID FT F
C 11
C -1(null)
C 12
C -15
C 13
C -14
O 11
O -13
O 12
O -14
O 15
O -1(null)
OBJ_ID FT F
C 11
C 12
C -15
C 13
C -14
O 11
O -13
O 12
O -14
O 15
43. 43
with unpivoted as (
select * from range_input
unpivot include nulls (
F for FT in (F as 1, T as -1)
)
)
select OBJ_ID, F, T, NUM_R
from (
select a.*,
lead(F) over(partition by obj_id order by F) T,
sum(FT) over(partition by obj_id order by F) NUM_R
from unpivoted a
) where F < nvl(T,F+1) and NUM_R > 0
order by obj_id, T;
OBJ_ID F T NUM_R
C 1 2 1
C 2 3 2
C 3 4 3
C 4 5 2
C 5 (null) 1
O 1 2 1
O 2 3 2
O 3 4 1
O 5 (null) 1