Knows nearly everything about, as in Ask Dr. Lock; he wrote the book on pediatric cardiology, or I wrote the book on job-hunting; I've been looking for two years. This expression is always put in the past tense. [Colloquial; second half of 1900s]
American Heritage Idioms
Phrase(s): wrote the book on something
Fig. to be very authoritative about something; to know enough about something to write the definitive book on it. (Always in past tense.) • Ted wrote the book on unemployment. He’s been looking for work in three states for two years. • Do I know about misery? I wrote the book on misery!
McGrawhill's American Idioms And Phrasal Verbs