<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Queries on Devops Monk</title><link>https://devops-monk.com/tags/queries/</link><description>Recent content in Queries on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 03 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/queries/index.xml" rel="self" type="application/rss+xml"/><item><title>JPQL, @Query, and Native Queries in Spring Data JPA</title><link>https://devops-monk.com/tutorials/spring-boot/spring-data-jpa-queries/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/spring-boot/spring-data-jpa-queries/</guid><description>Derived query methods cover simple cases. Complex filtering, aggregation, and reporting queries need JPQL or native SQL. This article covers both with practical examples.
JPQL vs SQL vs Native SQL JPQL Native SQL Writes Entity-oriented (FROM Order o) Table-oriented (FROM orders o) Portability DB-agnostic DB-specific Features Basic SQL + JPA joins Full DB-specific SQL (CTEs, window functions, JSONB) Type-safety Partial None Use for Most queries Reporting, DB-specific features @Query with JPQL public interface OrderRepository extends JpaRepository&amp;lt;Order, UUID&amp;gt; { // Basic JPQL — uses entity/field names, not table/column names @Query(&amp;#34;SELECT o FROM Order o WHERE o.</description></item></channel></rss>