I just want to know if you can query a platform event?
Other answers have shown that it's not supported to query events using SOQL, but I want to clarify that it's not only not supported, it is not meaningful.
Platform events form an ordered time stream. Each event has a specific "replay ID", and each event's replay ID is higher (not necessarily 1 higher, but higher) than the previous event's. They're guaranteed to be delivered in a specific order to clients that are watching the event stream, such as Platform Event triggers and external subscribers.
There is a replay mechanism whereby clients that "missed" part of the stream can supply the last replay ID they received and have all of the event between then and the current moment resent to them for processing (again, in order). However, this replay window only covers 24 hours.
Events are intended to be ephemeral ordered messages, not random-access data storage. An event would be something like "Object X changed!", where the underlying data store is Object X. You can query that object, but it wouldn't make sense to query the event itself. An individual event may or may not contain enough information to carry meaning outside its position in the timestream and the state of the object at that time.
If you need change history tracking that's queryable, you should use a different feature that's made to do that.
From Salesforce documentation:
No SOQL Support You can’t query event notifications using SOQL.