How to measure Tobin's q?
If you are interested in Tobin's (average) q,  you might find useful A Simple Approximation of Tobin's q (Chung and Pruitt (1994)). That paper has a highly accurate approximation for Tobin's Q using Compustat. While the JSTOR copy I linked to is pay-walled, other versions appear not to be.