# Need Sql help ~ help me out

**URL:** <https://forum.freecodecamp.org/t/need-sql-help-help-me-out/320435>\
**Category:** General\
**Created:** [October 9, 2019, 3:35am UTC](https://forum.freecodecamp.org/t/need-sql-help-help-me-out/320435 "2019-10-09T03:35:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![workformehra](https://avatars.discourse-cdn.com/v4/letter/w/df788c/32.png) [@workformehra](https://forum.freecodecamp.org/u/workformehra)\
**Post date:** [October 9, 2019, 3:35am UTC](https://forum.freecodecamp.org/t/need-sql-help-help-me-out/320435/1 "2019-10-09T03:35:27Z")

</div>

database file -\> [https://drive.google.com/open?id=1g5H4CET4oM7W3ZpZzDfeOpeeC\_appqqm](https://drive.google.com/open?id=1g5H4CET4oM7W3ZpZzDfeOpeeC_appqqm) Write a query to produce a report for each store including stores without any sales. Your result-set should include the following information: • the storeID • the store name • the number of players that have purchased a badge from the store • the number of players that have not purchased a badge from the store; • the total money spent at the store • the most expensive badge a player has purchased at the store • the cheapest badge a player has purchased at the store • the average price of the items that have been purchased at the store\*\*\*strong text\*\*\*

---

<div class="post-metadata">

**Author:** ![workformehra](https://avatars.discourse-cdn.com/v4/letter/w/df788c/32.png) [@workformehra](https://forum.freecodecamp.org/u/workformehra)\
**Post date:** [October 9, 2019, 7:10am UTC](https://forum.freecodecamp.org/t/need-sql-help-help-me-out/320435/3 "2019-10-09T07:10:36Z")

</div>

@camperextraordinaire  
`SELECT store.storeID, store.storeName, purchase.cost,purchase.username AS whobuy FROM store INNER JOIN purchase ON store.storeID= purchase.storeID`  
i have try this … but when i was trying to give more complex queries it show me so earror

---

<div class="post-metadata">

**Author:** ![sqlabecedarian](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sqlabecedarian/32/230623_2.png) [@sqlabecedarian](https://forum.freecodecamp.org/u/sqlabecedarian)\
**Post date:** [October 23, 2019, 5:09am UTC](https://forum.freecodecamp.org/t/need-sql-help-help-me-out/320435/4 "2019-10-23T05:09:41Z")

</div>

Hi

Did you find the error?

Carol

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 2:46pm UTC](https://forum.freecodecamp.org/t/need-sql-help-help-me-out/320435/5 "2021-01-16T14:46:19Z")

</div>

Closed on January 16, 2021, 2:46pm UTC


