<?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 Re: SQL Query Last Customer Order Date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-last-customer-order-date/m-p/12571113#M2008501</link>
    <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;gbry404&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Welcome to the SAP Community! Thank you for visiting us to get
answers to your questions.&lt;/P&gt;

&lt;P&gt;Since you're asking a question here for the first time, I'd like
to offer some friendly advice on how to get the most out of your community
membership and experience.&lt;/P&gt;

&lt;P&gt;First, please see &lt;A href="https://community.sap.com/resources/questions-and-answers" target="_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, as this resource page provides tips for preparing questions that
draw responses from our members. Secondly, feel free to take our Q&amp;amp;A
tutorial at &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt; as well, as that will help you when submitting questions to
the community.&lt;/P&gt;

&lt;P&gt;Second, if you're interested in connecting
with community members, please pay a visit to our new Welcome Corner. You'll
need to sign up, but it's a great way to interact with peers and get to know
other experts!&lt;/P&gt;

&lt;P&gt;Third Check the Welcome Corner thread
with advice from our champions: &lt;A href="https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-and-answers/m-p/123609" target="_blank"&gt;https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-and-answers/m-p/123609&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Finally, I recommend that you include a profile picture. By
personalizing your profile, you encourage readers to respond: &lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I hope you find this advice
useful, and we're happy to have you as part of SAP Community!&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Dedi&lt;/P&gt;</description>
    <pubDate>Wed, 09 Nov 2022 11:38:50 GMT</pubDate>
    <dc:creator>former_member27</dc:creator>
    <dc:date>2022-11-09T11:38:50Z</dc:date>
    <item>
      <title>SQL Query Last Customer Order Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-last-customer-order-date/m-p/12571112#M2008500</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I am trying to build a query to see the last order date for each customer in our system (along with the contact details for each customer file). All active and inactive customers. Currently the only way I am able to remotely get close to what I need is for it to show every invoice ever placed by each customer and I can get rid of duplicates in Excel but it doesn't leave me with the most recent doc date. I have also tried to set the doc date range to look at certain time periods of activity but that doesn't exclude customers who are more recently active. I have tried to use the Group By function but it goes into error every time. This is what I have so far, but need to just have the most recent doc per customer. &lt;/P&gt;
  &lt;P&gt;SELECT T1.[DocDate], T0.[CardCode], T0.[CardName], T0.[CntctPrsn], T0.[E_Mail], T0.[MailCountr], T0.[State2], T0.[MailCity], T0.[validFor], T0.[frozenFrom], T0.[FrozenComm] FROM OCRD T0 INNER JOIN INV1 T1 ON T0.[CardCode] = T1.[BaseCard]&lt;/P&gt;
  &lt;P&gt;I'm sure I'm missing something obvious but I'm not overly familiar with running these reports. Any help would be appreciated. Thank you. &lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 11:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-last-customer-order-date/m-p/12571112#M2008500</guid>
      <dc:creator>former_member1042939</dc:creator>
      <dc:date>2022-11-09T11:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query Last Customer Order Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-last-customer-order-date/m-p/12571113#M2008501</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;gbry404&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Welcome to the SAP Community! Thank you for visiting us to get
answers to your questions.&lt;/P&gt;

&lt;P&gt;Since you're asking a question here for the first time, I'd like
to offer some friendly advice on how to get the most out of your community
membership and experience.&lt;/P&gt;

&lt;P&gt;First, please see &lt;A href="https://community.sap.com/resources/questions-and-answers" target="_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;, as this resource page provides tips for preparing questions that
draw responses from our members. Secondly, feel free to take our Q&amp;amp;A
tutorial at &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt; as well, as that will help you when submitting questions to
the community.&lt;/P&gt;

&lt;P&gt;Second, if you're interested in connecting
with community members, please pay a visit to our new Welcome Corner. You'll
need to sign up, but it's a great way to interact with peers and get to know
other experts!&lt;/P&gt;

&lt;P&gt;Third Check the Welcome Corner thread
with advice from our champions: &lt;A href="https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-and-answers/m-p/123609" target="_blank"&gt;https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-and-answers/m-p/123609&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Finally, I recommend that you include a profile picture. By
personalizing your profile, you encourage readers to respond: &lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I hope you find this advice
useful, and we're happy to have you as part of SAP Community!&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Dedi&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 11:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-last-customer-order-date/m-p/12571113#M2008501</guid>
      <dc:creator>former_member27</dc:creator>
      <dc:date>2022-11-09T11:38:50Z</dc:date>
    </item>
  </channel>
</rss>

