It was only by good fortune no one was injured when Trent Leonard Kunde fired a sawn-off shotgun at a house as he went past in a ute.
At the time, 17 people lived in the Carseldine residence, in Brisbane's north.
Kunde, then 25, fired shots at the house in April 2022 at 12.34am, a court has heard.
The car he was a passenger in then did a U-turn before he fired more rounds at the home.
Six rounds were found in the house with some passing through walls into a second bedroom where a 15-year-old girl and a five-month-old child were sleeping.
The residents sheltered on the floor.
“Thankfully for the occupants of the house and indeed ultimately for you nobody was harmed because … the potential for great harm was very real," Brisbane District Court Judge Carl Heaton said on Thursday.
It was clear the incident was a paid job for Kunde and his reward was financial.
"You've demonstrated yourself to be a person who was prepared to accept money, carry out considerable acts of violence with great potential harm to members of the community," Judge Heaton said.
Kunde's criminal history reflected an extensive association with drugs, the court heard.
He had been sentenced in 2020 for possession of a border-controlled drug.
Judge Heaton found Kunde's actions in April 2022 were premeditated and said the sentence imposed should reflect that community violence of this nature should not be tolerated.
The court heard Kunde could reach a turning point, with plans to take over his late-father's long-standing business after his incarceration.
Kunde pleaded guilty to the shooting and was sentenced to five-and-a-half years behind bars.
He will be eligible for parole in February due to time already served.