# SQL query in Data Explorer to pull latest topics?

**URL:** <https://meta.discourse.org/t/sql-query-in-data-explorer-to-pull-latest-topics/63908>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [June 4, 2017, 3:47pm UTC](https://meta.discourse.org/t/sql-query-in-data-explorer-to-pull-latest-topics/63908 "2017-06-04T15:47:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sunnyt7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunnyt7/32/71920_2.png) [@sunnyt7](https://meta.discourse.org/u/sunnyt7)\
**Post date:** [June 4, 2017, 3:47pm UTC](https://meta.discourse.org/t/sql-query-in-data-explorer-to-pull-latest-topics/63908/1 "2017-06-04T15:47:22Z")

</div>

Hey there,

I’m looking to display something like this on my Wordpress homepage:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/b/1bc5b353753c588d80d0a8887dc06457f971dc8e.png)

I’m using @meglio’s Twig Anything to do this, which can pull data from any JSON feed. I’ve tried just using [https://meta.discourse.org/latest.json](https://meta.discourse.org/latest.json), but the issue is that it’s difficult to pull the user avatars, as the users array does not use User ID as a key.

@meglio recommended that I create a special SQL request in the Discourse [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin, and extract all fields needed in resulting rows.

Unfortunately I have no experience in writing SQL queries. Would anyone be able to help with this? (been told it should be a piece of cake).

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/sql-query-in-data-explorer-to-pull-latest-topics/63908)._
