<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PROC SQL to produce distribution on all DATE variables in a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648710#M194383</link>
    <description>&lt;P&gt;I have a few datasets for which I have many various DATE variables. I'm looking to get the data distribution on each one. I've seen past posts which describe how to get min, max, nmissing, but I cannot seem to find a way to get the Q1 and Q3 marks (and if possible P1 and P99).&lt;/P&gt;&lt;P&gt;I need to use PROC SQL because I am accessing data through some data servers which operate through PROC SQL.&lt;/P&gt;&lt;P&gt;Thank you kindly!&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2020 23:37:30 GMT</pubDate>
    <dc:creator>JamieTee</dc:creator>
    <dc:date>2020-05-18T23:37:30Z</dc:date>
    <item>
      <title>PROC SQL to produce distribution on all DATE variables in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648710#M194383</link>
      <description>&lt;P&gt;I have a few datasets for which I have many various DATE variables. I'm looking to get the data distribution on each one. I've seen past posts which describe how to get min, max, nmissing, but I cannot seem to find a way to get the Q1 and Q3 marks (and if possible P1 and P99).&lt;/P&gt;&lt;P&gt;I need to use PROC SQL because I am accessing data through some data servers which operate through PROC SQL.&lt;/P&gt;&lt;P&gt;Thank you kindly!&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 23:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648710#M194383</guid>
      <dc:creator>JamieTee</dc:creator>
      <dc:date>2020-05-18T23:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL to produce distribution on all DATE variables in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648727#M194386</link>
      <description>&lt;P&gt;If you're going through SQL and must use SQL are you using Explicit Pass through? Otherwise you can use the standard PROC MEANS approach.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are using explicit pass through, then your code needs to be SQL specific and you need to use the specific functions that align with your SQL variant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you know which variables are dates that you want to analyze? Based on variable type or a naming convention?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329625"&gt;@JamieTee&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a few datasets for which I have many various DATE variables. I'm looking to get the data distribution on each one. I've seen past posts which describe how to get min, max, nmissing, but I cannot seem to find a way to get the Q1 and Q3 marks (and if possible P1 and P99).&lt;/P&gt;
&lt;P&gt;I need to use PROC SQL because I am accessing data through some data servers which operate through PROC SQL.&lt;/P&gt;
&lt;P&gt;Thank you kindly!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 01:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648727#M194386</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-19T01:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL to produce distribution on all DATE variables in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648729#M194388</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;thank you for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked up explicit pass through (&lt;A href="https://communities.sas.com/t5/SAS-Programming/Implicit-vs-Explicit-SQL-Pass-through-SQL-Query-in-SAS/td-p/261905" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Implicit-vs-Explicit-SQL-Pass-through-SQL-Query-in-SAS/td-p/261905&lt;/A&gt;), and it looks like that's exactly what I'm using.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be identifying the DATE variables based on their format, which is generally DATE9. - would it be possible to search by the 'Type' of the variable instead (in case something is in a different DATE format)? Thank you kindly for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 01:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648729#M194388</guid>
      <dc:creator>JamieTee</dc:creator>
      <dc:date>2020-05-19T01:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL to produce distribution on all DATE variables in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648732#M194390</link>
      <description>&lt;P&gt;How I would do this is first to identify all my date variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All DB have dictionary tables that indicate the variable name and type. You can query that to build your list of variables you need to apply it to.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second is to figure out what the function is you need for explicit pass through based on the SQL variant. Most have it, but they're never efficient at those calculations by the way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your data is in the smaller range (few million) I'd recommend downloading the data and then using a full SAS approach. That'll save you programming time but it'll take slightly longer to run - I suspect you won't make up the run time difference in this process but you'll learn how to do it I suppose.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 01:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648732#M194390</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-19T01:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL to produce distribution on all DATE variables in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648744#M194397</link>
      <description>&lt;P&gt;If the external DBMS doesn't provide the tools to calculate the quantiles, it could surely give you the record counts for each date. You could thus query for the dates and their frequencies and use proc univariate with a freq statement to get the quantiles. I think you would have to do this separately for each date variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hth&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 02:32:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-to-produce-distribution-on-all-DATE-variables-in-a/m-p/648744#M194397</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-19T02:32:58Z</dc:date>
    </item>
  </channel>
</rss>

