<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Analog for window function in Entity SQL (Thread)</title><description> Hello,  Im working with SpiraTestEntities.R_HistoryChangeSets table and would like to output only latest hisoryChange record for each requirement/test set.  I was trying to find information about how to use window function with Entity SQl but have found nothing. Looks like it is not supported.   Is there any workaround in Spira to use window functions such as ROW_NUMBER() or DENSE_RANK()?     Best Regards,  Andrii </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/reports/2039.aspx</link><item><guid isPermaLink="false">threadId=2039</guid><author>Andrii Bilous (andrii.bilous@edetek.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">custom report</category><title>Analog for window function in Entity SQL</title><description> Hello,  Im working with SpiraTestEntities.R_HistoryChangeSets table and would like to output only latest hisoryChange record for each requirement/test set.  I was trying to find information about how to use window function with Entity SQl but have found nothing. Looks like it is not supported.   Is there any workaround in Spira to use window functions such as ROW_NUMBER() or DENSE_RANK()?     Best Regards,  Andrii </description><pubDate>Wed, 05 Jun 2019 04:32:20 -0400</pubDate><a10:updated>2019-06-07T17:55:57-04:00</a10:updated><link>/Support/Forum/spirateam/reports/2039.aspx</link></item><item><guid isPermaLink="false">messageId=3607</guid><author>Jim R (donotreply5@kronodesk.net)</author><title> Hello,  That is a good question, please use  TOP(x)  like this:   select value top (2) R from Spira</title><description> Hello,  That is a good question, please use  TOP(x)  like this:   select value top (2) R from SpiraTestEntities.R_Incidents as R where R.PROJECT_ID = ${ProjectId}   OR with specific column names:   select top (2) R.INCIDENT_ID, R.NAME from SpiraTestEntities.R_Incidents as R where R.PROJECT_ID = ${ProjectId}   Regards  Jim </description><pubDate>Fri, 07 Jun 2019 17:55:57 -0400</pubDate><a10:updated>2019-06-07T17:55:57-04:00</a10:updated><link>/Support/Forum/spirateam/reports/2039.aspx#reply3607</link></item></channel></rss>