SlideShare ist ein Scribd-Unternehmen logo
1 von 37
PROC SQL
IN SAS ENTERPRISE
GUIDE 4.3
Mark Tabladillo
December 12, 2011
About MarkTab
2


       Consultant: Data Mining Architect
         SAS  since 1991
         Microsoft MVP this year

         Presenting and Publishing since 1998

       Data Mining Blog http://www.marktab.net
       Twitter @marktabnet




                           (C) 2011 Mark Tabladillo
Purpose
3


       Provide basic vocabulary and pointers for
        absolute beginners
       Challenge intermediate-to-advanced users




                         (C) 2011 Mark Tabladillo
Outline
4


       Basics on Enterprise Guide 4.3
       PROC SQL
         SQL  Clauses
         Order of Operations – Best Practices

         Joins – Best Practices

         Macro variables




                           (C) 2011 Mark Tabladillo
(C) 2011 Mark Tabladillo   5




BASICS ON SAS
ENTERPRISE GUIDE
4.3
About SAS Enterprise Guide
6
    4.3
       Shipped July 2011
       New features include
         New  Program Editor with Autocomplete and
          Integrated Syntax Help
         Explicit SQL Pass-through Option

         Macro Variables for Conditional Processing
        http://support.sas.com/documentation/cdl/en/whatsnew/62580/HTML/default/viewer.htm#egwhatsnew43
        .htm




                                            (C) 2011 Mark Tabladillo
SAS Enterprise Guide 4.3
7
    Tutorial
       http://support.sas.com/documentation/onlinedoc/guide/tut43/en/




                                  (C) 2011 Mark Tabladillo
Tutorial Topics
8




                 (C) 2011 Mark Tabladillo
Enterprise Guide is Client
Software

                  SAS
                  on Windows
                                               SAS
                                               on Mainframe



                                             SAS
                                             on UNIX
 SAS Enterprise
 Guide
                  (C) 2011 Mark Tabladillo
                                                       9
The SAS Intelligence Platform
Architecture
  Enterprise Guide is fully integrated with the
    servers in the SAS 9 environment.




                          SAS Metadata Server
                                                                          SAS OLAP
                                                                          Server




   SAS Enterprise Guide                             SAS Stored Process Server


                                 SAS Workspace Server
                           (C) 2011 Mark Tabladillo
                                                                                10
(C) 2011 Mark Tabladillo   11




PROC SQL
SQL Clauses
Important in Enterprise Guide
12




                  (C) 2011 Mark Tabladillo
Autocompletion
13




                 (C) 2011 Mark Tabladillo
Typical SQL Statement – Six
14
     Clauses
     SELECT column-1 <, ...column-n>
          FROM table-1|view-1<, ...table-n|view-n>
          <WHERE expression>
          <GROUP BY column-1 <, ....column-n>>
          <HAVING expression>
          <ORDER BY column-1 <DESC><, ...
     Column-n>>;
          quit;


                         (C) 2011 Mark Tabladillo
How many clauses are
15
     required?
     SELECT column-1 <, ...column-n>
          FROM table-1|view-1<, ...table-n|view-n>
          <WHERE expression>
          <GROUP BY column-1 <, ....column-n>>
          <HAVING expression>
          <ORDER BY column-1 <DESC><, ...
     Column-n>>;
          quit;


                         (C) 2011 Mark Tabladillo
What is an example of a
16
     column?
     SELECT column-1 <, ...column-n>
          FROM table-1|view-1<, ...table-n|view-n>
          <WHERE expression>
          <GROUP BY column-1 <, ....column-n>>
          <HAVING expression>
          <ORDER BY column-1 <DESC><, ...
     Column-n>>;
          quit;


                         (C) 2011 Mark Tabladillo
What is an example of a table?
17


     SELECT column-1 <, ...column-n>
          FROM table-1|view-1<, ...table-n|view-n>
          <WHERE expression>
          <GROUP BY column-1 <, ....column-n>>
          <HAVING expression>
          <ORDER BY column-1 <DESC><, ...
     Column-n>>;
          quit;


                         (C) 2011 Mark Tabladillo
What is an example of an
18
     expression?
     SELECT column-1 <, ...column-n>
          FROM table-1|view-1<, ...table-n|view-n>
          <WHERE expression>
          <GROUP BY column-1 <, ....column-n>>
          <HAVING expression>
          <ORDER BY column-1 <DESC><, ...
     Column-n>>;
          quit;


                         (C) 2011 Mark Tabladillo
What does DESC mean?
19


     SELECT column-1 <, ...column-n>
          FROM table-1|view-1<, ...table-n|view-n>
          <WHERE expression>
          <GROUP BY column-1 <, ....column-n>>
          <HAVING expression>
          <ORDER BY column-1 <DESC><, ...
     Column-n>>;
          quit;


                         (C) 2011 Mark Tabladillo
Mnemonic
20

     SELECT column-1 <, ...column-n>
              FROM table-1|view-1<, ...table-n|view-n>
              <WHERE expression>

              <GROUP BY column-1 <, ....column-n>>

              <HAVING expression>

              <ORDER BY column-1 <DESC><, ... Column-n>>;
               quit;

     SO
                FEW
                WORKERS
                GO
                HOME
                ON time!
                                           (C) 2011 Mark Tabladillo
(C) 2011 Mark Tabladillo   21




PROC SQL
Order of Operations – Best Practices
Order of Operations
22


        SQL is a declarative language
          You  declare the final product
          Then, the SQL interpreter decides how to create
           that final product




                            (C) 2011 Mark Tabladillo
Why try for one SELECT
23
     statement?
        SQL is a declarative language
          You  declare the final product
          Then, the SQL interpreter decides how to create
           that final product




                            (C) 2011 Mark Tabladillo
Order of Operations
24


     5   SELECT column-1 <, ...column-n>
           1
              FROM table-1|view-1<, ...table-n|view-n>
           2  <WHERE expression>
           3  <GROUP BY column-1 <, ....column-n>>
           4  <HAVING expression>
           6  <ORDER BY column-1 <DESC><, ...
         Column-n>>;
              quit;


                             (C) 2011 Mark Tabladillo
Best Practices?
25


     5   SELECT column-1 <, ...column-n>
           1
              FROM table-1|view-1<, ...table-n|view-n>
           2  <WHERE expression>
           3  <GROUP BY column-1 <, ....column-n>>
           4  <HAVING expression>
           6  <ORDER BY column-1 <DESC><, ...
         Column-n>>;
              quit;


                             (C) 2011 Mark Tabladillo
(C) 2011 Mark Tabladillo   26




PROC SQL
Joins – Best Practices
Joins
27

     Type                                   Description
     LEFT JOIN                              One to Many
     RIGHT JOIN                             Many to One
     FULL JOIN                              Many to Many, with Missing
     CROSS JOIN                             Product
     UNION JOIN                             Concatenation
     NATURAL JOIN                           Conservative Matching


        Recommended:
        Sams Teach Yourself SQL in 10 Minutes (3rd Edition) by Ben Forta
        Reference:
        http://support.sas.com/documentation/cdl/en/proc/61895/HTML/def
        ault/viewer.htm#a002473691.htm

                                   (C) 2011 Mark Tabladillo
Think Through Join Sources
28


        SAS can join
          SAS

          Excel

          Access

          Oracle

          Mainframe

          Text   Files



                          (C) 2011 Mark Tabladillo
Best Practice Rules
29


        Typed data is better than non-typed
        Subset better than the whole
        Native SQL better than SAS SQL
        In-memory data is faster than disk data
        Close to the server is better than far away –
         subset before moving
        SAS sources are better than not


                            (C) 2011 Mark Tabladillo
(C) 2011 Mark Tabladillo   30




PROC SQL
Macro Variables
PROC SQL Makes Macro
31
     Variables
     SELECT column-1 <, ...column-n>
             INTO macro-variable-specification
     < , ... macro-variable-specification>
             FROM table-1|view-1<, ...table-n|view-n>
             <WHERE expression>
             <GROUP BY column-1 <, ....column-n>>
             <HAVING expression>
             <ORDER BY column-1 <DESC><, ...
     Column-n>>;
             quit;         (C) 2011 Mark Tabladillo
What is a Macro Variable?
32


        Text Variable
        Stores Information in Memory
        Typically scoped to Global
        Dynamically Generated
          Useful as a prequel to a PROC SQL statement
          Useful as an Enterprise Guide 4.3 Condition




                           (C) 2011 Mark Tabladillo
Macro Variables as Conditions
33




                 (C) 2011 Mark Tabladillo
Defining a Macro Condition
34




                 (C) 2011 Mark Tabladillo
Process Flow Conditions
35




                 (C) 2011 Mark Tabladillo
Recommended
36


        http://support.sas.com
        Books
          Sams   Teach Yourself SQL in 10 Minutes (3rd
           Edition) by Ben Forta
          The Little SAS Book for Enterprise Guide 4.2 by
           Susan J. Slaughter and Lora D. Delwiche
          Professional SAS Programmer's Pocket
           Reference Sixth Edition by Rick Aster



                            (C) 2011 Mark Tabladillo
Conclusion
37


        Enterprise Guide 4.3 allows for simple through
         advanced processing with PROC SQL
        Many resources available:
          FreeSAS tutorials
          Books

          People




                               (C) 2011 Mark Tabladillo

Weitere ähnliche Inhalte

Was ist angesagt?

SAS cheat sheet
SAS cheat sheetSAS cheat sheet
SAS cheat sheetAli Ajouz
 
SAS Macros part 2
SAS Macros part 2SAS Macros part 2
SAS Macros part 2venkatam
 
Understanding sas data step processing.
Understanding sas data step processing.Understanding sas data step processing.
Understanding sas data step processing.Ravi Mandal, MBA
 
Introduction To Sas
Introduction To SasIntroduction To Sas
Introduction To Sashalasti
 
SAS Access / SAS Connect
SAS Access / SAS ConnectSAS Access / SAS Connect
SAS Access / SAS Connectguest2160992
 
SAS Macros part 1
SAS Macros part 1SAS Macros part 1
SAS Macros part 1venkatam
 
Basics Of SAS Programming Language
Basics Of SAS Programming LanguageBasics Of SAS Programming Language
Basics Of SAS Programming Languageguest2160992
 
Sas Functions INDEX / INDEXC / INDEXW
Sas Functions INDEX / INDEXC / INDEXWSas Functions INDEX / INDEXC / INDEXW
Sas Functions INDEX / INDEXC / INDEXWTHARUN PORANDLA
 
A Step-By-Step Introduction to SAS Report Procedure
A Step-By-Step Introduction to SAS Report ProcedureA Step-By-Step Introduction to SAS Report Procedure
A Step-By-Step Introduction to SAS Report ProcedureYesAnalytics
 
64 interview questions
64 interview questions64 interview questions
64 interview questionsTarikul Alam
 
Introduction to SAS
Introduction to SASIntroduction to SAS
Introduction to SASizahn
 
Base SAS Full Sample Paper
Base SAS Full Sample Paper Base SAS Full Sample Paper
Base SAS Full Sample Paper Jimmy Rana
 
Metadata and ADaM
Metadata and ADaMMetadata and ADaM
Metadata and ADaMKevin Lee
 
SAS Macros part 4.1
SAS Macros part 4.1SAS Macros part 4.1
SAS Macros part 4.1venkatam
 

Was ist angesagt? (20)

SAS cheat sheet
SAS cheat sheetSAS cheat sheet
SAS cheat sheet
 
SAS Macros part 2
SAS Macros part 2SAS Macros part 2
SAS Macros part 2
 
Sas cheat
Sas cheatSas cheat
Sas cheat
 
Understanding sas data step processing.
Understanding sas data step processing.Understanding sas data step processing.
Understanding sas data step processing.
 
Introduction To Sas
Introduction To SasIntroduction To Sas
Introduction To Sas
 
SAS Access / SAS Connect
SAS Access / SAS ConnectSAS Access / SAS Connect
SAS Access / SAS Connect
 
SAS Macros part 1
SAS Macros part 1SAS Macros part 1
SAS Macros part 1
 
SAS Programming Notes
SAS Programming NotesSAS Programming Notes
SAS Programming Notes
 
Basics Of SAS Programming Language
Basics Of SAS Programming LanguageBasics Of SAS Programming Language
Basics Of SAS Programming Language
 
Sas Functions INDEX / INDEXC / INDEXW
Sas Functions INDEX / INDEXC / INDEXWSas Functions INDEX / INDEXC / INDEXW
Sas Functions INDEX / INDEXC / INDEXW
 
SAS Functions
SAS FunctionsSAS Functions
SAS Functions
 
Basics of SAS
Basics of SASBasics of SAS
Basics of SAS
 
Sas summary guide
Sas summary guideSas summary guide
Sas summary guide
 
Sas practice programs
Sas practice programsSas practice programs
Sas practice programs
 
A Step-By-Step Introduction to SAS Report Procedure
A Step-By-Step Introduction to SAS Report ProcedureA Step-By-Step Introduction to SAS Report Procedure
A Step-By-Step Introduction to SAS Report Procedure
 
64 interview questions
64 interview questions64 interview questions
64 interview questions
 
Introduction to SAS
Introduction to SASIntroduction to SAS
Introduction to SAS
 
Base SAS Full Sample Paper
Base SAS Full Sample Paper Base SAS Full Sample Paper
Base SAS Full Sample Paper
 
Metadata and ADaM
Metadata and ADaMMetadata and ADaM
Metadata and ADaM
 
SAS Macros part 4.1
SAS Macros part 4.1SAS Macros part 4.1
SAS Macros part 4.1
 

Andere mochten auch

Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...
Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...
Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...cambridgeWD
 
Sas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary ToolSas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary Toolsysseminar
 
Hechsp 001 Chapter 3
Hechsp 001 Chapter 3Hechsp 001 Chapter 3
Hechsp 001 Chapter 3Brian Kelly
 
Regression analysis
Regression analysisRegression analysis
Regression analysissaba khan
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysisnadiazaheer
 
Regression analysis
Regression analysisRegression analysis
Regression analysisRavi shankar
 
Statistics
StatisticsStatistics
Statisticspikuoec
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis pptElkana Rorio
 

Andere mochten auch (10)

Desayuno sma 06 09-2011
Desayuno sma 06 09-2011Desayuno sma 06 09-2011
Desayuno sma 06 09-2011
 
Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...
Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...
Clinical Trials Versus Health Outcomes Research: SAS/STAT Versus SAS Enterpri...
 
Sas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary ToolSas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary Tool
 
Hechsp 001 Chapter 3
Hechsp 001 Chapter 3Hechsp 001 Chapter 3
Hechsp 001 Chapter 3
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
SAS basics Step by step learning
SAS basics Step by step learningSAS basics Step by step learning
SAS basics Step by step learning
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Statistics
StatisticsStatistics
Statistics
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 

Ähnlich wie Proc SQL in SAS Enterprise Guide 4.3

Comparison between rdbms and nosql
Comparison between rdbms and nosqlComparison between rdbms and nosql
Comparison between rdbms and nosqlbharati k
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 CourseMarcus Davage
 
Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptxCecilia Brusatori
 
New SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunNew SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunMind The Firebird
 
Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1
Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1
Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1John Boyle
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005Govind Raj
 
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsContinuent
 
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsLinas Virbalas
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012Eduardo Castro
 
War of the Indices- SQL Server and Oracle
War of the Indices-  SQL Server and OracleWar of the Indices-  SQL Server and Oracle
War of the Indices- SQL Server and OracleKellyn Pot'Vin-Gorman
 
Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11Abhishek Verma
 
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...Trivadis
 
Flink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at AlibabaFlink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at AlibabaDataWorks Summit
 
Sas Talk To R Users Group
Sas Talk To R Users GroupSas Talk To R Users Group
Sas Talk To R Users Groupgeorgette1200
 
SQL Server 2014 In-Memory Tables (XTP, Hekaton)
SQL Server 2014 In-Memory Tables (XTP, Hekaton)SQL Server 2014 In-Memory Tables (XTP, Hekaton)
SQL Server 2014 In-Memory Tables (XTP, Hekaton)Tony Rogerson
 
Microsoft (SQL Server)
Microsoft (SQL Server)Microsoft (SQL Server)
Microsoft (SQL Server)Vinayak Hegde
 

Ähnlich wie Proc SQL in SAS Enterprise Guide 4.3 (20)

Comparison between rdbms and nosql
Comparison between rdbms and nosqlComparison between rdbms and nosql
Comparison between rdbms and nosql
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 Course
 
Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptx
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
New SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunNew SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad Khorsun
 
Oracle 10g
Oracle 10gOracle 10g
Oracle 10g
 
Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1
Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1
Oracle Database Administration Part I covering Both Oracle 11g r2 and 12c r1
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005
 
Reporting Solution
Reporting SolutionReporting Solution
Reporting Solution
 
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
 
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
War of the Indices- SQL Server and Oracle
War of the Indices-  SQL Server and OracleWar of the Indices-  SQL Server and Oracle
War of the Indices- SQL Server and Oracle
 
Abap tcodes
Abap tcodesAbap tcodes
Abap tcodes
 
Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11Db2 V12 incompatibilities_&amp;_improvements_over_V11
Db2 V12 incompatibilities_&amp;_improvements_over_V11
 
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
Trivadis TechEvent 2016 Useful Oracle 12c Features for Data Warehousing by Da...
 
Flink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at AlibabaFlink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at Alibaba
 
Sas Talk To R Users Group
Sas Talk To R Users GroupSas Talk To R Users Group
Sas Talk To R Users Group
 
SQL Server 2014 In-Memory Tables (XTP, Hekaton)
SQL Server 2014 In-Memory Tables (XTP, Hekaton)SQL Server 2014 In-Memory Tables (XTP, Hekaton)
SQL Server 2014 In-Memory Tables (XTP, Hekaton)
 
Microsoft (SQL Server)
Microsoft (SQL Server)Microsoft (SQL Server)
Microsoft (SQL Server)
 

Mehr von Mark Tabladillo

How to find low-cost or free data science resources 202006
How to find low-cost or free data science resources 202006How to find low-cost or free data science resources 202006
How to find low-cost or free data science resources 202006Mark Tabladillo
 
Microsoft Build 2020: Data Science Recap
Microsoft Build 2020: Data Science RecapMicrosoft Build 2020: Data Science Recap
Microsoft Build 2020: Data Science RecapMark Tabladillo
 
201909 Automated ML for Developers
201909 Automated ML for Developers201909 Automated ML for Developers
201909 Automated ML for DevelopersMark Tabladillo
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated MLMark Tabladillo
 
201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0Mark Tabladillo
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019Mark Tabladillo
 
201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusML201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusMLMark Tabladillo
 
201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0Mark Tabladillo
 
201905 Azure Databricks for Machine Learning
201905 Azure Databricks for Machine Learning201905 Azure Databricks for Machine Learning
201905 Azure Databricks for Machine LearningMark Tabladillo
 
201905 Azure Certification DP-100: Designing and Implementing a Data Science ...
201905 Azure Certification DP-100: Designing and Implementing a Data Science ...201905 Azure Certification DP-100: Designing and Implementing a Data Science ...
201905 Azure Certification DP-100: Designing and Implementing a Data Science ...Mark Tabladillo
 
Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904Mark Tabladillo
 
Managing Enterprise Data Science 201904
Managing Enterprise Data Science 201904Managing Enterprise Data Science 201904
Managing Enterprise Data Science 201904Mark Tabladillo
 
Training of Python scikit-learn models on Azure
Training of Python scikit-learn models on AzureTraining of Python scikit-learn models on Azure
Training of Python scikit-learn models on AzureMark Tabladillo
 
Big Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft AzureBig Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft AzureMark Tabladillo
 
Advanced Analytics with Power BI 201808
Advanced Analytics with Power BI 201808Advanced Analytics with Power BI 201808
Advanced Analytics with Power BI 201808Mark Tabladillo
 
Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)
Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)
Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)Mark Tabladillo
 
Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Mark Tabladillo
 
Microsoft Technologies for Data Science 201612
Microsoft Technologies for Data Science 201612Microsoft Technologies for Data Science 201612
Microsoft Technologies for Data Science 201612Mark Tabladillo
 
How Big Companies plan to use Our Big Data 201610
How Big Companies plan to use Our Big Data 201610How Big Companies plan to use Our Big Data 201610
How Big Companies plan to use Our Big Data 201610Mark Tabladillo
 
Georgia Tech Data Science Hackathon September 2016
Georgia Tech Data Science Hackathon September 2016Georgia Tech Data Science Hackathon September 2016
Georgia Tech Data Science Hackathon September 2016Mark Tabladillo
 

Mehr von Mark Tabladillo (20)

How to find low-cost or free data science resources 202006
How to find low-cost or free data science resources 202006How to find low-cost or free data science resources 202006
How to find low-cost or free data science resources 202006
 
Microsoft Build 2020: Data Science Recap
Microsoft Build 2020: Data Science RecapMicrosoft Build 2020: Data Science Recap
Microsoft Build 2020: Data Science Recap
 
201909 Automated ML for Developers
201909 Automated ML for Developers201909 Automated ML for Developers
201909 Automated ML for Developers
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated ML
 
201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0201906 01 Introduction to ML.NET 1.0
201906 01 Introduction to ML.NET 1.0
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019
 
201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusML201906 03 Introduction to NimbusML
201906 03 Introduction to NimbusML
 
201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0201906 02 Introduction to AutoML with ML.NET 1.0
201906 02 Introduction to AutoML with ML.NET 1.0
 
201905 Azure Databricks for Machine Learning
201905 Azure Databricks for Machine Learning201905 Azure Databricks for Machine Learning
201905 Azure Databricks for Machine Learning
 
201905 Azure Certification DP-100: Designing and Implementing a Data Science ...
201905 Azure Certification DP-100: Designing and Implementing a Data Science ...201905 Azure Certification DP-100: Designing and Implementing a Data Science ...
201905 Azure Certification DP-100: Designing and Implementing a Data Science ...
 
Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904
 
Managing Enterprise Data Science 201904
Managing Enterprise Data Science 201904Managing Enterprise Data Science 201904
Managing Enterprise Data Science 201904
 
Training of Python scikit-learn models on Azure
Training of Python scikit-learn models on AzureTraining of Python scikit-learn models on Azure
Training of Python scikit-learn models on Azure
 
Big Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft AzureBig Data Adavnced Analytics on Microsoft Azure
Big Data Adavnced Analytics on Microsoft Azure
 
Advanced Analytics with Power BI 201808
Advanced Analytics with Power BI 201808Advanced Analytics with Power BI 201808
Advanced Analytics with Power BI 201808
 
Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)
Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)
Microsoft Cognitive Toolkit (Atlanta Code Camp 2017)
 
Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017Machine learning services with SQL Server 2017
Machine learning services with SQL Server 2017
 
Microsoft Technologies for Data Science 201612
Microsoft Technologies for Data Science 201612Microsoft Technologies for Data Science 201612
Microsoft Technologies for Data Science 201612
 
How Big Companies plan to use Our Big Data 201610
How Big Companies plan to use Our Big Data 201610How Big Companies plan to use Our Big Data 201610
How Big Companies plan to use Our Big Data 201610
 
Georgia Tech Data Science Hackathon September 2016
Georgia Tech Data Science Hackathon September 2016Georgia Tech Data Science Hackathon September 2016
Georgia Tech Data Science Hackathon September 2016
 

Kürzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Proc SQL in SAS Enterprise Guide 4.3

  • 1. PROC SQL IN SAS ENTERPRISE GUIDE 4.3 Mark Tabladillo December 12, 2011
  • 2. About MarkTab 2  Consultant: Data Mining Architect  SAS since 1991  Microsoft MVP this year  Presenting and Publishing since 1998  Data Mining Blog http://www.marktab.net  Twitter @marktabnet (C) 2011 Mark Tabladillo
  • 3. Purpose 3  Provide basic vocabulary and pointers for absolute beginners  Challenge intermediate-to-advanced users (C) 2011 Mark Tabladillo
  • 4. Outline 4  Basics on Enterprise Guide 4.3  PROC SQL  SQL Clauses  Order of Operations – Best Practices  Joins – Best Practices  Macro variables (C) 2011 Mark Tabladillo
  • 5. (C) 2011 Mark Tabladillo 5 BASICS ON SAS ENTERPRISE GUIDE 4.3
  • 6. About SAS Enterprise Guide 6 4.3  Shipped July 2011  New features include  New Program Editor with Autocomplete and Integrated Syntax Help  Explicit SQL Pass-through Option  Macro Variables for Conditional Processing http://support.sas.com/documentation/cdl/en/whatsnew/62580/HTML/default/viewer.htm#egwhatsnew43 .htm (C) 2011 Mark Tabladillo
  • 7. SAS Enterprise Guide 4.3 7 Tutorial  http://support.sas.com/documentation/onlinedoc/guide/tut43/en/ (C) 2011 Mark Tabladillo
  • 8. Tutorial Topics 8 (C) 2011 Mark Tabladillo
  • 9. Enterprise Guide is Client Software SAS on Windows SAS on Mainframe SAS on UNIX SAS Enterprise Guide (C) 2011 Mark Tabladillo 9
  • 10. The SAS Intelligence Platform Architecture Enterprise Guide is fully integrated with the servers in the SAS 9 environment. SAS Metadata Server SAS OLAP Server SAS Enterprise Guide SAS Stored Process Server SAS Workspace Server (C) 2011 Mark Tabladillo 10
  • 11. (C) 2011 Mark Tabladillo 11 PROC SQL SQL Clauses
  • 12. Important in Enterprise Guide 12 (C) 2011 Mark Tabladillo
  • 13. Autocompletion 13 (C) 2011 Mark Tabladillo
  • 14. Typical SQL Statement – Six 14 Clauses SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 15. How many clauses are 15 required? SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 16. What is an example of a 16 column? SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 17. What is an example of a table? 17 SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 18. What is an example of an 18 expression? SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 19. What does DESC mean? 19 SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 20. Mnemonic 20 SELECT column-1 <, ...column-n> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; SO FEW WORKERS GO HOME ON time! (C) 2011 Mark Tabladillo
  • 21. (C) 2011 Mark Tabladillo 21 PROC SQL Order of Operations – Best Practices
  • 22. Order of Operations 22  SQL is a declarative language  You declare the final product  Then, the SQL interpreter decides how to create that final product (C) 2011 Mark Tabladillo
  • 23. Why try for one SELECT 23 statement?  SQL is a declarative language  You declare the final product  Then, the SQL interpreter decides how to create that final product (C) 2011 Mark Tabladillo
  • 24. Order of Operations 24 5 SELECT column-1 <, ...column-n> 1 FROM table-1|view-1<, ...table-n|view-n> 2 <WHERE expression> 3 <GROUP BY column-1 <, ....column-n>> 4 <HAVING expression> 6 <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 25. Best Practices? 25 5 SELECT column-1 <, ...column-n> 1 FROM table-1|view-1<, ...table-n|view-n> 2 <WHERE expression> 3 <GROUP BY column-1 <, ....column-n>> 4 <HAVING expression> 6 <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 26. (C) 2011 Mark Tabladillo 26 PROC SQL Joins – Best Practices
  • 27. Joins 27 Type Description LEFT JOIN One to Many RIGHT JOIN Many to One FULL JOIN Many to Many, with Missing CROSS JOIN Product UNION JOIN Concatenation NATURAL JOIN Conservative Matching Recommended: Sams Teach Yourself SQL in 10 Minutes (3rd Edition) by Ben Forta Reference: http://support.sas.com/documentation/cdl/en/proc/61895/HTML/def ault/viewer.htm#a002473691.htm (C) 2011 Mark Tabladillo
  • 28. Think Through Join Sources 28  SAS can join  SAS  Excel  Access  Oracle  Mainframe  Text Files (C) 2011 Mark Tabladillo
  • 29. Best Practice Rules 29  Typed data is better than non-typed  Subset better than the whole  Native SQL better than SAS SQL  In-memory data is faster than disk data  Close to the server is better than far away – subset before moving  SAS sources are better than not (C) 2011 Mark Tabladillo
  • 30. (C) 2011 Mark Tabladillo 30 PROC SQL Macro Variables
  • 31. PROC SQL Makes Macro 31 Variables SELECT column-1 <, ...column-n> INTO macro-variable-specification < , ... macro-variable-specification> FROM table-1|view-1<, ...table-n|view-n> <WHERE expression> <GROUP BY column-1 <, ....column-n>> <HAVING expression> <ORDER BY column-1 <DESC><, ... Column-n>>; quit; (C) 2011 Mark Tabladillo
  • 32. What is a Macro Variable? 32  Text Variable  Stores Information in Memory  Typically scoped to Global  Dynamically Generated  Useful as a prequel to a PROC SQL statement  Useful as an Enterprise Guide 4.3 Condition (C) 2011 Mark Tabladillo
  • 33. Macro Variables as Conditions 33 (C) 2011 Mark Tabladillo
  • 34. Defining a Macro Condition 34 (C) 2011 Mark Tabladillo
  • 35. Process Flow Conditions 35 (C) 2011 Mark Tabladillo
  • 36. Recommended 36  http://support.sas.com  Books  Sams Teach Yourself SQL in 10 Minutes (3rd Edition) by Ben Forta  The Little SAS Book for Enterprise Guide 4.2 by Susan J. Slaughter and Lora D. Delwiche  Professional SAS Programmer's Pocket Reference Sixth Edition by Rick Aster (C) 2011 Mark Tabladillo
  • 37. Conclusion 37  Enterprise Guide 4.3 allows for simple through advanced processing with PROC SQL  Many resources available:  FreeSAS tutorials  Books  People (C) 2011 Mark Tabladillo