Purpose We aimed to describe the demographics, cancer subtypes, comorbidities and outcomes of patients with a history of cancer with COVID-19 from March to June 2020. Secondly, we compared patients hospitalized with COVID-19 to patients diagnosed with COVID-19 and patients hospitalized with influenza. Methods We conducted a cohort study using eight routinely-collected healthcare databases from Spain and the US, standardized to the Observational Medical Outcome Partnership common data model. Three cohorts of patients with a history of cancer were included: i) diagnosed with COVID-19, ii) hospitalized with COVID-19, and iii) hospitalized with influenza in 2017-2018. Patients were followed from index date to 30 days or death. We reported demographics, cancer subtypes, comorbidities, and 30-day outcomes. Results We included 118,155 patients with a cancer history in the COVID-19 diagnosed and 41,939 in the COVID-19 hospitalized cohorts. The most frequent cancer subtypes were prostate and breast cancer (range: 5-19% and 1-14% in the diagnosed cohort, respectively). Hematological malignancies were also frequent, with non-Hodgkin lymphoma being among the 5 most common cancer subtypes in the diagnosed cohort. Overall, patients were more frequently aged above 65 years and had multiple comorbidities. Occurrence of death ranged from 8% to 14% and from 18% to 26% in the diagnosed and hospitalized COVID-19 cohorts, respectively. Patients hospitalized with influenza (n=242,960) had a similar distribution of cancer subtypes, sex, age and comorbidities but lower occurrence of adverse events. Conclusion Patients with a history of cancer and COVID-19 have advanced age, multiple comorbidities, and a high occurence of COVID-19-related events. Additionaly, hematological malignancies were frequent in these patients.This observational study provides epidemiologic characteristics that can inform clinical care and future etiological studies.