Small Cells (SCs) mounted on top of Unmanned Aerial Vehicles (UAVs) can be used to boost the radio capacity in hotspot zones. However, UAV-SCs are subject to tight battery constraints, resulting in frequent recharges operated at the ground sites. To meet the UAV-SCs energy demanded to the ground sites, the operator leverages a set of Solar Panels (SPs) and grid connection. In this work, we demonstrate that both i) the level of throughput provided to a set of areas and ii) the amount of energy that is exchanged with the grid by the ground sites play a critical role in such UAV-aided cellular network. We then formulate the J-MATE model to jointly optimize the energy and throughput through revenue and cost components. In addition, we design the BBSR algorithm, which is able to retrieve a solution even for large problem instances. We evaluate J-MATE and BBSR over a realistic scenario composed of dozens of areas and multiple ground sites, showing that: i) both J-MATE and BBSR outperform previous approaches targeting either the throughput maximization or the energy minimization, and ii) the computation time and the memory occupation of BBSR are reduced up to five orders of magnitude compared to J-MATE.