docs.intersystems.com
Home / InterSystems MDX Reference / MDX Functions / LASTCHILD

InterSystems MDX Reference
LASTCHILD
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Returns the last child of the given member.
Returned Type
This function returns a member.
Syntax and Details
member_expression.LASTCHILD 
Where:
The function returns the last child of this member. To determine which child is last, the function considers the default order of the set of children.
Example
For example:
SELECT MEASURES.[%COUNT] ON 0, homed.zip.[34577].LASTCHILD ON 1 FROM patients
 
                             Patient Count
Pine                                 1,100
To see a picture of the hierarchy used in this example, see the FIRSTCHILD function.
For another example:
SELECT MEASURES.[%COUNT] ON 0, birthd.[1950].LASTCHILD ON 1 FROM patients
                             Patient Count
Dec-1950                                  8
See Also


Previous section           Next section
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-04-10 14:45:56