PQ is end to end (first station to last station) quota used to allot short destination passengers to preserve the interest of long distance passengers.
.
For example in 6339 Mumbai-Nagercoil Exp:
(1) Anyone wanting to travel from Mumbai(/Dadar/Kalyan/Karjat/Lonavala) beyond the last quota station and upto Erode are provided accommodation in PQ only.
(2)...
more... Anyone wanting to travel from Mumbai to last Remote location quota station is provided accommodation in that quota.
(3) Does this mean that the end to end passengers (Mumbai to Madurai/Nagercoil) have to shell out their berths for the PQ passengers? The answer is NO, because for them even the PQ is used for allotting berths during booking, if at all the GN quota gets filled up. Hence for them it is advantageous to have a PQ, so that they can keep the short distance passengers restricted to that quota , but still utilize it if the long distance (GN quota) gets filled up.
(4) Passengers boarding from Pune/Solapur etc are also provided accommodation in PQ during booking, if their own remote location quota is filled up.
.
Disclaimer : The quota system in 6339 was like this when I last travelled. It may have been changed, but this is explained as a concept.
.
The quota (1 or more) to allot for a particular source-destination combination is selected by the system only, based on the configuration for that train. The booking staff does not have any control on it.
.
The only way to avoid PQWL is try booking ticket till such a station for which tickets are alloted from GN quota.