<?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 How to write SQL query and apply aggregate functions on it in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083280#M1506313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iu2019ve a task to write SQL query on tree tables and do inner join on them. Iu2019ve accomplish this task by using T-CODE SQVI. However now I need to write a query and apply SQL functions on it i.e. Add, Count, Max and Min etc. Please can someone tell me how I can write SQL query with aggregate functions in SAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jul 2010 02:15:29 GMT</pubDate>
    <dc:creator>former_member295881</dc:creator>
    <dc:date>2010-07-13T02:15:29Z</dc:date>
    <item>
      <title>How to write SQL query and apply aggregate functions on it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083280#M1506313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iu2019ve a task to write SQL query on tree tables and do inner join on them. Iu2019ve accomplish this task by using T-CODE SQVI. However now I need to write a query and apply SQL functions on it i.e. Add, Count, Max and Min etc. Please can someone tell me how I can write SQL query with aggregate functions in SAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 02:15:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083280#M1506313</guid>
      <dc:creator>former_member295881</dc:creator>
      <dc:date>2010-07-13T02:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to write SQL query and apply aggregate functions on it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083281#M1506314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SQVI limits in what can be done with the SQL Queries. Use SQ02 to first create infosets, it also provides you with options to write custom code blocks and then you can create queries in SQ01 based on the infoset created in SQ02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this article on [working with Queries|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 02:30:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083281#M1506314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-13T02:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to write SQL query and apply aggregate functions on it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083282#M1506315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select using an aggregate function &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: MAX_MSGNR type t100-msgnr.&lt;/P&gt;&lt;P&gt;           SELECT MAX( MSGNR ) FROM T100 INTO max_msgnr&lt;/P&gt;&lt;P&gt;                                                  WHERE SPRSL = 'D' AND&lt;/P&gt;&lt;P&gt;                                                  ARBGB = '00'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 04:16:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083282#M1506315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-13T04:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to write SQL query and apply aggregate functions on it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083283#M1506316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Mr. Cool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; you can see the below code for using aggregate functions.&lt;/P&gt;&lt;P&gt;where ARTIST and SEATSOCCU are the field names for which you want to perform these functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: TOTAL_ENTRIES TYPE I,&lt;/P&gt;&lt;P&gt;      TOTAL_ATT TYPE I,&lt;/P&gt;&lt;P&gt;      MAX_ATT TYPE I,&lt;/P&gt;&lt;P&gt;      AVG_ATT TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT COUNT( DISTINCT ARTIST )&lt;/P&gt;&lt;P&gt;       SUM( SEATSOCCU )&lt;/P&gt;&lt;P&gt;       MAX( SEATSOCCU )&lt;/P&gt;&lt;P&gt;       AVG( SEATSOCCU ) FROM YCONCERT INTO (TOTAL_ENTRIES, TOTAL_ATT,&lt;/P&gt;&lt;P&gt;MAX_ATT, AVG_ATT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lalit Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 05:03:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-sql-query-and-apply-aggregate-functions-on-it/m-p/7083283#M1506316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-13T05:03:46Z</dc:date>
    </item>
  </channel>
</rss>

