First question is why query? Lets see the advantage of queries.
1.First you can limit the amount of data you retrieve from the server by defining only the specific columns you need
2.You can join multiple tables into one query saving loop code pattern.
3.They are also light weight than Table Queries.
Below is the article which gives step wise procedure how to fetch data using a query and how to link it to a part page
Bron : Chris D’silva’s Blog
Learn how to use the Chart Parts feature in the RTC (Role Tailored Client) version of Microsoft Dynamics NAV.
Bron : ArcherPoint
Microsoft Dynamics NAV can be embedded in SharePoint online which will be available as an app in SharePoint. Thus, NAV data will be displayed on the SharePoint site. The user can then modify and save the data on the SharePoint site through the NAV web client. Also, web parts such as Sales Orders List, Customers List, etc. can be added to the SharePoint site.
Bron : Cloudfronts
I thought it would be cool to be able to get the role center parts to interact with each-other in Microsoft Dynamics NAV 2013 R2. I wanted to see if it was possible to have a role center part to display different information based on what was highlighted in another role center part. This way the role center itself would become more interactive.
Bron : Olof Simren