# Getting Started with Basic Graph Queries in Tiger Graph

Hello everyone,

I am new to Tiger Graph and excited to learn more about it. I am trying to understand how to write basic graph queries and would appreciate any guidance.

1. What are the essential concepts I should grasp to get started with writing queries?
2. Can someone share a simple example of a query to find connections between two nodes?
3. Are there any recommended resources or tutorials for beginners?

I have already read this site https://medium.com/swlh/getting-started-with-tigergraph-3-0-4aac0ca4fb3d-salesforce-marketing-cloud-developer/ but i could not found any correct details.
Additionally, if you have any tips or best practices for someone just starting out with Tiger Graph
please share them. I am looking forward to learning from this community.

Thank you

Best regards

[Selena]

Hi @sellynotty,

Thanks for your enthusiasm in the TigerGraph platform!

What are the essential concepts I should grasp to get started with writing queries?

I’d say the following concepts:

• Traversals
• how can you go from one vertex to another via the edges, directed vs non-directed edges…
• WHERE clause
• just like in SQL, you can use WHERE clause to filter the vertex and the edges by the attributes
• Accumulators
• accumulators allow us to do more complicated computations!

I’d say that these are the things you can learn along while writing queries! One of the best ways to learn is to practice writing those.

Can someone share a simple example of a query to find connections between two nodes?

The most basic query involving the connections between two node types would be like this:

``````CREATE OR REPLACE QUERY find_connections(VERTEX<Person> input_person) {
start_person = {input_person};
movies_reviewed = SELECT t
FROM start_person:s -(Reviewed:e)- Movies:t
;

PRINT movies_reviewed;
}
``````

Are there any recommended resources or tutorials for beginners

Absolutely!

• We have a TigerGraph University course for you to get more details on the platform.
https://tigergraph-university.teachable.com/courses/
• For beginners, I’d recommend the “Intro to Graph Fundamentals” course, specifically the portion about “GSQL 101” and “GSQL Writing Best Practices”
• Then, if you want to dive deeper into the ML Algorithms, there’s the “Graph Data Science Using Graph Algorithms for Advanced Analytics” course.
• We also have multiple starter kits for you to get started, as well as the different videos around that. The starter kits comes with sample data and queries that you can run. You can also explore the graph on your own:
https://www.youtube.com/watch?v=-14X12Npr3U&list=PLq4l3NnrSRp5SMFUp3YLQRj5SBYbnB7fU
• The tutorial portion of the docs page shows some examples of the different queries you can write with TigerGraph: GSQL 101 :: GSQL Language Reference
• The docs page also hold valuable information about the different features of TigerGraph (e.g. SELECT statement, GraphStudio…): TigerGraph Documentation :: Explore
• We also have this public documentation too covering different aspects like TigerGraph Analytics and TG Insights: Self-Training Guide - Google Docs
• And of course, you can ask the community in this dev forum for tips, advice, and information!

If you have not done so already, I’d recommend getting an account on TG Cloud and then create a free cluster there. After that, you can choose to load in data from the 10+ different starter kits that we have for a start.

I hope this helps!

Best,
Supawish Limprasert (Jim)
Solution Engineer, TigerGraph