<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">you can use the layer filter for this. The exact filter expression depends on the data source you use, because you have to use the
 SQL-Syntax of your data source.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">To filter a layer with data source in an geopackage you can use:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">"HubDist" = (select min(HubDist) from hubs)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">min() is the minimum function in SQLite (geopackage uses SQLite-Syntax), hubs is the name of the layer.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">In PostgreSQL the function is also called min(). In other data source it may be another function (if there is one).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Regards Dirk<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> QGIS-User [mailto:qgis-user-bounces@lists.osgeo.org]
<b>Im Auftrag von </b>Igor Oliveira Ribeiro via QGIS-User<br>
<b>Gesendet:</b> Freitag, 17. Februar 2023 20:25<br>
<b>An:</b> qgis-user <qgis-user@lists.osgeo.org><br>
<b>Betreff:</b> [Qgis-user] [FILTER] How to filter a layer by minimum attribute value<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Hi,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">how can I filter layer by the minimum value of the field "HubDist" in the attribute table?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">See my attribute table below. As result, I expect only one attribute being showed in my map related to "HubDist" equal 111.3546... (the value in the first line).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif"><img width="250" height="542" id="_x0000_i1025" src="cid:image001.png@01D9438F.E07F1730" alt="image.png"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Thanks for your help.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr style="height:21.0pt">
<td colspan="2" valign="top" style="padding:5.0pt 5.0pt 5.0pt 5.0pt;height:21.0pt;overflow:hidden">
<p style="margin:0cm;margin-bottom:.0001pt"><a href="https://doi.org/10.1016/j.envpol.2020.114029" target="_blank"><b><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#274E13">See our last paper: </span></i></b></a><o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><a href="https://doi.org/10.1016/j.envpol.2020.114029" target="_blank"><i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black">Impact of biomass burning on a metropolitan area in the Amazon during
 the 2015 El Niño: The enhancement of carbon monoxide and levoglucosan concentrations.</span></i></a><o:p></o:p></p>
</td>
</tr>
<tr style="height:128.7pt">
<td valign="top" style="border:none;border-right:solid #38761D 3.0pt;padding:5.0pt 5.0pt 5.0pt 5.0pt;height:128.7pt;overflow:hidden">
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:black;border:none windowtext 1.0pt;padding:0cm"><img border="0" width="146" height="145" id="_x0000_i1026" src="https://lh5.googleusercontent.com/-bliIGlTBH64UHBAAns8Ubhxgih0cgNVZjNAWPkBZSkYIa-o9idb3Km_x571oZ3NL0nZVMvFmclRedyzJDfv00BMdZPjcKg4zD1y1yGGErKoPszFJuTRjvN_0fmLsa4Ah_2YTtxJ"></span><o:p></o:p></p>
</td>
<td valign="top" style="border:none;padding:5.0pt 5.0pt 5.0pt 5.0pt;height:128.7pt;overflow:hidden">
<p style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-family:"Georgia",serif;color:#38761D">Igor Oliveira Ribeiro</span></b><o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><i><span style="font-size:8.0pt;font-family:"Georgia",serif;color:black">Post-Doc on Regional Climate Change, Vulnerability, Impacts and Adaptation - Cuomo Foundation/UEA</span></i><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#222222">+55 92 98103 7136 | skype: igorflorestal</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#222222">Universidade do Estado do Amazonas | Instituto Nacional de Pesquisas da Amazônia</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#222222">Visite:
</span><a href="http://www.geoescrita.com.br" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#38761D">www.geoescrita.com.br</span></a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><a href="https://www.linkedin.com/in/igoroliveiraribeiro/" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#1155CC;border:none windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="27" height="27" id="_x0000_i1027" src="https://lh4.googleusercontent.com/2py0KXy5JccNXFC-38-2TT9wnYCQAXMRBlM5H0eOS83jy2Sz-PUr9_1C57srnad478ma9o9_fAYHjUhFN7Hza3OOCSiFHFpboznBl1PpVLavbfnjGYoU1usFc0W8j9pS4VzAKwCV"></span></a><a href="https://www.instagram.com/geoescrita/" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#1155CC;border:none windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="27" height="27" id="_x0000_i1028" src="https://lh4.googleusercontent.com/-FUMJ4HbrYAwwTKB49CF6r39wVYnoWf1AD9ZLKvD6Z1Cu1yqyo8NRk-InWHOa34J87OHDcJcCstkC_khG2_jCc6qDGop64cV2F0OL-IZ1S3Jgf9SfxVF08U9xfx47ov24InhjsqE"></span></a><a href="https://www.researchgate.net/profile/Igor_Oliveira_Ribeiro" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#1155CC;border:none windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="27" height="27" id="_x0000_i1029" src="https://lh6.googleusercontent.com/ert1Bk_3idA2Vb4MK8Hd3B1p2vdcL52JrOmNjaGhhbS7caCNQiZwRKKX55B9pB7-3j2nPFttXJezhSxrHQeBpnEnpeD_CRjzBQgPo5hG5C68qhY1wRFMu0PDv9LbQ8iY8-K4bwIk"></span></a><a href="http://lattes.cnpq.br/3909691804095045" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#1155CC;border:none windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="27" height="27" id="_x0000_i1030" src="https://lh6.googleusercontent.com/z9emf1sj2DW-tYYJZ6Qkd3RxvB23DjQdH7bLcTDIv9zyi-XnZRAroZBc8OPJqQkDIvZJBpd7GCa-2ClAT2gT3ubJ4yZj1BA0-T8hGgBboms-kjpowUuhBQO4z4EcWDwF9w25FGiy"></span></a><a href="https://orcid.org/0000-0002-3529-0525" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#1155CC;border:none windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="27" height="27" id="_x0000_i1031" src="https://lh4.googleusercontent.com/fOmYAxdij-Q_UFG3dFFnhy_zegLQSPZcgxSE-l8u9XuSz6LvnUGItsmoPZL_GCcfoYF2yl9dqYGs3842AcozPLqY103OWAe1x-js_lNLXym1Wcde7j4r19_vICiJXP5xaE_-KPIL"></span></a><a href="https://www.geoescrita.com.br/" target="_blank"><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#1155CC;border:none windowtext 1.0pt;padding:0cm;text-decoration:none"><img border="0" width="27" height="27" id="_x0000_i1032" src="https://lh3.googleusercontent.com/H041znsV0LChyhfdBIDwXHwIh5BUG2TCmQYBSI1d4eF1NX80_T79MtdQqif3DHpBIDgzvXhuXDLc0l77eylJCPuW7jbalTIbVqBg-dm8S-JHOxZh458R0UX8SsJINhcqw7nG7_Pw"></span></a><o:p></o:p></p>
</td>
</tr>
<tr style="height:21.0pt">
<td colspan="2" valign="top" style="padding:5.0pt 5.0pt 5.0pt 5.0pt;height:21.0pt;overflow:hidden">
<p style="margin:0cm;margin-bottom:.0001pt"><i><span style="font-size:8.0pt;font-family:"Georgia",serif;color:#274E13">Think globally, act locally!</span></i><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>