Solved

Gognos : How to select latest date

Posted on 2013-12-21
2
367 Views
Last Modified: 2013-12-23
Hi All,

I generated a report to show customers outstanding balance with date. The issue that report is duplicating each customer showing multiable date and i found that latest date is the correct.

How can I filter date table to show only latest date only?

Thank you.
0
Comment
Question by:amq10
2 Comments
 
LVL 6

Accepted Solution

by:
ButlerTechnology earned 500 total points
ID: 39734488
A sub-query in the where clause using the MAX function will allow you to get the last date.
Here's an example:
 Select * 
from Customer C inner join Purchase P
         on c.CustomerID = p.CustomerID
where p.PurchaseDate = (Select max(Purchasedate) from Purchase where CustomerID = c.CustomerID)

Open in new window


Tom
0
 

Author Closing Comment

by:amq10
ID: 39736414
it works, thank you
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now