Hello,
Learning a new thing is always good and useful, so yes you can go ahead and learn SQL, but doing custom queries directly into the db can break things.
The results that you are getting are different because the concept of 'inactive subscribers' is not the same as the ones that did not open in a time period. If the filter is pretty straightforward, selecting the ones that did not open, for the command things are different in the way that are considered inactive the ones that matching the following conditions at once for the requested time period:
1. Did not received any campaign
2. Did not open
3. Did not click .
You can check in the code apps/common/models/ListSubscriber::getIsInactiveInTimePeriod() method if you are interested.
As for the speed, you will not get a higher speed than the command, especially using phpmyadmin.
Cosmin