---
title: "Discussion on \"The SQL query runs. Why does it return a sword?\" | Hashnode"
description: "Discussion on \"The SQL query runs. Why does it return a sword?\". A six-row PostgreSQL example shows how valid SQL can return the wrong props. Compare AND and OR, then try the puzzle in an illustrated story."
url: "https://hashnode.com/posts/the-sql-query-runs-why-does-it-return-a-sword/6addc0b84846183761ea366a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The SQL query runs. Why does it return a sword?](https://sqlbrief.hashnode.dev/the-sql-query-runs-why-does-it-return-a-sword?utm_source=hashnode&utm_medium=feed)

A six-row PostgreSQL example shows how valid SQL can return the wrong props. Compare AND and OR, then try the puzzle in an illustrated story.

Oct 25 · 4 min read · sqlbrief.hashnode.dev  
Read the article

-   [#sql](https://hashnode.com/tag/sql)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#beginnersguide](https://hashnode.com/tag/beginnersguide)

## Written by

[Aleks](https://hashnode.com/@aleks-sqlbrief)

@aleks-sqlbrief

  
[View profile](https://hashnode.com/@aleks-sqlbrief)

Building SQLBrief: hands-on SQL practice, from your first query to product analytics.

I'm Aleks, building SQLBrief. I write about SQL mistakes that change the meaning of a report, with examples you can run yourself. SQLBrief offers browser-based SQL practice in English and Russian.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
