Canadian retail sales edged expectations in June with merchandise and sporting goods sales climbing as the Toronto Raptors made their NBA championship winning run, according to the latest numbers from Statistics Canada.

Clothing and clothing accessories stores saw a 4.2 per cent uptick in sales, while sporting goods, hobby, book and music stores recorded a 3.7 per cent increase, the federal agency said.

"These gains also followed inclement weather in May and coincided with the Toronto Raptors playing in and winning the NBA championship in June," Statistics Canada said in a release on Friday.

Most of the other subsectors saw stronger sales, but these were offset by lower sales at motor vehicle and parts dealers and gasoline stations.

Overall, sales in the retail trade sector were essentially unchanged in June from May at $51.3 billion, the agency said.

Economists on average had expected a decline of 0.1 per cent, according to the financial markets data firm Refinitiv.

"A flat Canadian retail sales reading isn't usually anything to cheer about. But when it comes against consensus expectations for a decline, not to mention alongside a solid gain in volumes, we'll certainly take it," CIBC economist Royce Mendes said in a note to clients.

Sales were down in four of 11 subsectors tracked by Statistics Canada.

Motor vehicle and parts dealers fell 2.5 per cent in June as sales at new car dealers were down 3.2 per cent. Gasoline station sales fell 3.4 per cent as the price of gasoline moved lower.

Excluding sales in these two subsectors, monthly retail sales gained 1.7 per cent. Retail sales in volume terms increased 0.4 per cent.

Sales at building material and garden equipment and supplies dealers rose by six per cent, while general merchandise stores' sales rose by three per cent in June.

Cannabis stores also saw a 6.2 per cent jump in sales in June, on a low base to $91 million unadjusted.

The uptick in sales in clothing and sporting goods during the month were likely fuelled by the Toronto Raptors' historic win, economists said.

It was the first NBA championship in the Toronto franchise's history and marked the first for a Canadian team in one of the big four North American professional sports since the Toronto Blue Jays won the 1993 World Series.

After the win in mid-June, fans lined up outside stores to buy special edition NBA championship merchandise and millions filled the streets in downtown Toronto for a parade to celebrate the team.

"The good gains in clothing and sporting goods might be partially driven by the Raptors effect, as their championship run was in high gear in the month," said BMO Capital Markets' Canadian rates and macro strategist Benjamin Reitzes in a note to clients.

In addition to the Raptors-fuelled sales bump in clothing and sporting goods, the monthly survey of food services and drinking places showed a one per cent increase in June.

"Canadian restaurants and bars were big winners during the NBA playoffs," CIBC's Mendes said.