Real-world evidence suggests SGLT2 inhibitors are associated with lower risk of pneumonia, pneumonia-related mortality and sepsis. Here, SLC5A2 is linked to susceptibility to pneumonia measurement.