<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p class="elementToProof" style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Hello,</span></p>
<p class="elementToProof" style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></p>
<p class="elementToProof" style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">I encountered a problem, specifically:</span></p>
<p><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">This query works:</span></p>
<pre><div><span style="font-size: 12pt; color: rgb(0, 0, 0);"><code>DATA 'geometry from (select * from mrc order by maxcc desc) as subquery using unique unique_id'
</code></span></div></pre>
<p><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">However, this query doesn't work:</span></p>
<pre><div><span style="font-size: 12pt; color: rgb(0, 0, 0);"><code>DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as subquery using unique unique_id'
</code></span></div></pre>
<p><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Here's the full tileindex definition:</span></p>
<pre><div><span style="font-size: 12pt; color: rgb(0, 0, 0);"><code>LAYER
 DEBUG 5
 STATUS OFF
 NAME "time_idx"
 TYPE POLYGON

 CONNECTIONTYPE postgis
 CONNECTION "***"

 DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as subquery using unique unique_id'

 PROJECTION
   "init=epsg:3857"
 END

 VALIDATION
    'maxCC' '^[0-9]{1,3}$'
    'default_maxCC' '100'
 END

 METADATA
   "wms_title" "tile-index-cloud"
   "wms_timeextent" "2022-02-01/2023-10-10/P1D"
   "wms_timeitem" "timestamp"
   "wms_timedefault" "2023-10-10"
   "wms_enable_request" "!*"
 END
END
</code></span></div></pre>
<p><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">My MapServer version is 7.6.4.</span></p>
<p class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">The query results (but returns data in Postgres<br>
) in an empty window. I'm following the guidelines provided at <a href="https://mapserver.org/input/vector/postgis.html#data-access-connection-method" target="_new" id="OWA27df14cc-72d0-ac44-2182-0534c628df8c" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;">
https://mapserver.org/input/vector/postgis.html#data-access-connection-method</a>.</span></p>
<div id="Signature">
<div><br>
</div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Best,<br>
marcin<br>
</span></div>
<table style="margin-top: 30px; margin-bottom: 30px; width: 95%;" id="tableSelected0">
</table>
<table id="pbpsiglinktable">
<tbody>
<tr>
<td><a href="https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature"><img src="https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png"></a></td>
<td></td>
<td><span style="color: rgb(0, 120, 212);"><a href="https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature" style="text-decoration: none; color: rgb(0, 120, 212);">Book time to meet with me</a></span></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>