Does OrientDB order by #rid in default? - orientdb

As the title, seem that OrientDB order result set of SELECT by #rid in default.
But I cannot find any document about this.
Please help.
Thanks.

Yes, actually it is so, orient order by #rid by default.

Related

Details Query in pg_stat_statements

In pg_stat_statements output ("query" field):
SELECT * FROM users WHERE id = ?
How can I get the details of "?" from query in pg_stat_statements?
Can anybody tell me about this, because I want to track if anyone execute some query.
Can we also know which ip address this query execute from? so I can monitor if anyone make some modification data in database.
Thanks for the help.
You can use pg_stat_monitor, it has that feature.

Talend- get results from tdb2Row component and insert into another table

I'm running a select count query in a tDB2Row component. I need to get the value found and insert it into another table.
I've tried using the propagate query's recordset, but it doesn't make sense to me.
Also what component would i use next?
Thanks in advance!
Please use tDB2Input component for select query and give schema to it and add tLogRow to it to see the result.
tDB2Row is for dml query like update and delete.
Hope this helps...

How to sort the query results by the creating order(SL number)?

Is there a way to query AEM to get results in the order of node creation. I want to sort based on the current order of nodes in siteadmin/DAM (not the node creation date).
you can use sql2 'order by' clause
go to crxde and then click on tool. Select SQL2 and give your path in path and write
SELECT * FROM [dam:Asset] AS s WHERE ISDESCENDANTNODE([/content/dam]) order by [jcr:created]
May this help..:)

Select edge attributes and also expand/populate in and out in waterline

How can I populate in and out of edges in waterline
i am using waterline-oreintdb adopter
here is my query
select *,out.* from sellings // selling is edge class
Thanks
This sounds more like an OrientDB question than an waterline one. One option would be to use a fetch plan (OrientDB Docs):
select #this.toJSON('fetchPlan:in:1 out:1') from selling

Does Group by with order by work ion Dql?

I am trying to execute a DQL (Doctrine) query that retrieve the latest answers of different doctors.
we have table answer, member, Location (doctor table) and many other table connected to the doctor information. However I want to get the latest answer but the condition is one answer for a doctor. I do some search and know something about group by and order by dont work together !
Here is the query in DQL:
$query = Doctrine_Query::create()
->select("a.answer_id as answer_id,m.member_is as member_id,a.member_id")
->from('Answer a')
->leftJoin('a.Member m on m.member_id = a.member_id')
->orderBy('a.date_added DESC')
->groupBy('m.member_id')
->limit(5);
but this query return undesirable results. Can anyone tell me where is the mistake?
Unfortunately you need to perform a subquery for that, which according to this question, DQL does not support. However in that question it's suggested that you send a native query.