Hey man, I have a question. For the last query you had written, along with what products where purchased at the end can we get also how many times those products were purchased? How would you modify the query for that?
My first instinct would be to do this: SELECT array::len(->order->productproduct) AS number_of_products, ->order->productproduct.name AS product_names FROM person:00g8os512h0k7l19p05g Since array::len is not an agg function just gets the length of the products array it doesn't need a group by and you can get both in one query. If you'd need to use an agg function I'm pretty sure you'd need to do two queries, one for the agg function and one for non agg product list.
i know we can set additional fields during relate statement.. to me the relate table generated kinda looks like a fact table should i treat it that way? or keep it only with simple in and out i guess i was looking for a single in then multi out.
Whether its a dim or fact table depends on how you want to model your data. You can only have a single in and out for each query, but the table can have many in's and out's depending again on how you want to model your data.
Hi @@AnimeZone247 , yes, you have three options for that. You can use a Live Query (surrealdb.com/docs/surrealdb/surrealql/statements/live), custom events (surrealdb.com/docs/surrealdb/surrealql/statements/define/event) or Change Feeds (surrealdb.com/docs/surrealdb/surrealql/statements/define/table#using-changefeed-clause).
A graph database without a graph? Where are the graphs showing circles (nodes) with relationships or connections (edges) to other circles (nodes)? ArangoDB has that.
Hi, many thanks for your question. We have a visual graph, you can find it in the designer view in our Surrealist interface. However, since we are a multi-model database, you won't find lines and circles, but rather tables connected to other tables.
Hi, thanks for your question. Text to surrealQL is not currently on our roadmap. But, you can checkout the awesome surreal repo where you can find most of SurrealDB’s community projects: github.com/surrealdb/surrealdb
This short-form video series content is amazing! Keep it up!💪
Many thanks for the feedback. Stay tuned for more content!
Oh yeah - as someone whose spend a lot of time in relational databases, this is PLEASANT
Really nice job. Love this kinda content. Short, concise and very helpful. Cheers my dude
Thank you for the feedback.
Yes! Show us how it's done 🙏 Looking forward to more to come
Thanks for the comment. Stay tuned for the next video.
Great content. Thank you.
Glad you enjoyed it!
Like!
Hey man, I have a question. For the last query you had written, along with what products where purchased at the end can we get also how many times those products were purchased? How would you modify the query for that?
My first instinct would be to do this:
SELECT
array::len(->order->productproduct) AS number_of_products,
->order->productproduct.name AS product_names
FROM person:00g8os512h0k7l19p05g
Since array::len is not an agg function just gets the length of the products array it doesn't need a group by and you can get both in one query.
If you'd need to use an agg function I'm pretty sure you'd need to do two queries, one for the agg function and one for non agg product list.
Awesome stuff, would be great if you could cover define schemafull;
Thanks, we value your suggestion. This has been fed into our team for consideration.
i know we can set additional fields during relate statement.. to me the relate table generated kinda looks like a fact table should i treat it that way? or keep it only with simple in and out
i guess i was looking for a single in then multi out.
Whether its a dim or fact table depends on how you want to model your data. You can only have a single in and out for each query, but the table can have many in's and out's depending again on how you want to model your data.
@@SurrealDB i see so there not really a preferred way but only on the devs preference.. thank you
@@SurrealDBis there a way to subscribe to graphs, so I can get realtime notifications of database changes?
Hi @@AnimeZone247 , yes, you have three options for that. You can use a Live Query (surrealdb.com/docs/surrealdb/surrealql/statements/live), custom events (surrealdb.com/docs/surrealdb/surrealql/statements/define/event) or Change Feeds (surrealdb.com/docs/surrealdb/surrealql/statements/define/table#using-changefeed-clause).
A graph database without a graph? Where are the graphs showing circles (nodes) with relationships or connections (edges) to other circles (nodes)? ArangoDB has that.
Hi, many thanks for your question. We have a visual graph, you can find it in the designer view in our Surrealist interface.
However, since we are a multi-model database, you won't find lines and circles, but rather tables connected to other tables.
when do we get text-to-surrealql?
Hi, thanks for your question. Text to surrealQL is not currently on our roadmap. But, you can checkout the awesome surreal repo where you can find most of SurrealDB’s community projects: github.com/surrealdb/surrealdb
@@SurrealDB = wrong answer...