Here is a literal translation:
(d/q '[:find ?a-val ?c-val
:where
[?A :a.id ?id]
[?B :b.id ?id]
[?B :b.index ?index]
[?C :c.index ?index]
[?A :a ?a-val]
[?C :c ?c-val]]
db)
I've written that so you should be able to see how to translate from the question to the answer.
Hopefully it's clear that using ?index in two places that is doing the same job as = in the SQL where clause.
The clauses can be reordered anyhow and remain logically equivalent. The difference will be in performance: put the most narrowing/specific clauses first for better performance.
Some caveats:
Whether you want to have distinct attributes for the index and id concepts (for example a.index and b.index or only index) is down to your requirements. Datomic has good docs and tutorials.
There are many differences between SQL and Datalog, for example no tables in Datalog (meaning variable names ?A,?B,?C are arbitrary), but again this is all well documented.