After two weeks at No. 2, the song rises to the top, dethroning Katy Perry's 'Dark Horse,' featuring Juicy J, after four weeks at the summit. Plus, John Legend lands his first top 10

Clap for Pharrell Williams, whose bouncy single "Happy" reaches the top of the Billboard Hot 100 with a 2-1 rise. The song unseats Katy Perry's "Dark Horse," featuring Juicy J, which reigned the past four weeks (and despite the release of the latter's song's video last week). Meanwhile, John Legend earns his first Hot 100 top 10 with "All of Me."

As we do each Wednesday, let's run down the numbers behind the Hot 100's top 10.

Pharrell, 'G I R L': Track-By-Track Review

Williams claims his fourth Hot 100 No. 1, but first as a lead artist. He'd previously ruled as a featured act on Snoop Dogg's "Drop It Like It's Hot" (three weeks, 2004); Ludacris' "Money Maker" (two weeks, 2006); and Robin Thicke's "Blurred Lines" (also featuring T.I.; 12 weeks, 2013). (Technically, Williams boasts one other "Number One" on the Hot 100: his song "Number One," featuring Kanye West, reached No. 57 in 2006 …)

As half the duo the Neptunes, Williams has also produced and co-written two other Hot 100 No. 1s on which he doesn't claim an artist billing: Nelly's "Hot in Herre" (seven weeks, 2002) and Gwen Stefani's "Hollaback Girl" (four weeks, 2005).

Top 20 'Happy' Songs Ever

With Williams having first graced the Hot 100 the week of March 2, 2002 (as a guest, with Diddy, on Busta Rhymes' No. 11-peaking "Pass the Courvoisier Part II"), he waited 12 years and a week (as this week's chart is dated March 8) for his first Hot 100 topper as a lead act. He closes the longest interval between an act's first chart entry and first No. 1 as a lead since Dr. Dre needed 15 years and three weeks from 1993's No. 2 hit "Nuthin' But a 'G' Thang" to 2009's "Crack a Bottle," on which he shares lead billing with Eminem and 50 Cent. (In between, Dre spent four weeks at No. 1 in 1996 as a featured act on Blackstreet's "No Diggity.")

The longest such wait among all acts? Santana spanned almost exactly 30 years between the group's first Hot 100 hit, "Jingo" (Oct. 25, 1969), and its first No. 1, "Smooth," featuring Rob Thomas, which began its 12-week command on the Oct. 23, 1999, chart.

*Quick quiz: The Hot 100's new top title is also the fifth in the Hot 100's 55-year history with the word "happy" in its title. Can you name the others? Answer at the end of this story.

"Happy" tops the Hot 100 fueled largely by a 22% gain to 402,000 downloads sold, according to Nielsen SoundScan, and leads Digital Songs for a second week. The sum marks the biggest sales week for a song outside the Christmas season since the week ending Sept. 15, 2013, when Miley Cyrus' "Wrecking Ball" crashed No. 1 with 477,000 sold (after the song's buzz-worthy video had debuted on Sept. 9). "Happy" additionally pushes 4-2 on Radio Songs with a 28% surge to 139 million all-format audience impressions, according to Nielsen BDS, and hikes 7-4 on Streaming Songs with 6.1 million U.S. streams (up 38%), according to BDS.

The song claims the Hot 100's Airplay Gainer award for a fifth consecutive week and the Digital Gainer nod for a third straight frame.

"Happy" concurrently spends a third week at No. 1 on Hot R&B/Hip-Hop Songs.

"Happy" takes over atop the Hot 100 despite added streaming points for Perry's "Dark Horse" (1-2), whose official video was released on Feb. 20. "Horse" posts a second week at No. 1 on Radio Songs (150 million, up 5%), while the clip's premiere spurs the track's return to the top of Streaming Songs (3-1; 11.6 million, up 86%), netting it the Hot 100's Streaming Gainer ribbon; the song had first ruled Streaming Songs four weeks ago. "Horse" leads the subscription services-based On-Demand Songs chart (2.9 million U.S. streams, down 2%, according to BDS) for a seventh week. On Digital Songs, which it led for five weeks, "Horse" holds at No. 2 (251,000, down 9%).

The "Happy" and "Horse" race to the top of the Hot 100 was close again this week. Last week, "Horse" won over "Happy" by a tight 5% overall points margin. This week, with "Happy" up by 26% and "Horse" up by 15%, the former crosses the finish line first with a similarly slim 4% lead. (Likely further aiding Williams' cause next week: he'll perform "Happy" at the Oscars on Sunday (March 2). The track is nominated for best original song.)

Below the top two, Jason Derulo's "Talk Dirty," featuring 2 Chainz, logs a third week at No. 3 on the Hot 100. The cut backtracks 2-3 on Streaming Songs but with a 5% lift to 6.9 million. It rises 15-13 on Radio Songs (75 million, up 13%), while holding at No. 3 on Digital Songs (247,000, down 7%).

John Legend leaps to his first Hot 100 top 10, as "All of Me" vaults 11-4. The piano ballad notches a second week at No. 4 on Digital Songs (203,000, up 24%) and pushes 11-6 on Streaming Songs (4.5 million, up 26%) and 18-14 on Radio Songs (71 million, up 26%). While the song has become entrenched at R&B radio, leading Adult R&B songs for a fourth week this week, its profile and sales have soared after Legend sang it at the Grammy Awards on Jan. 26.

The Latest Pop Shop Podcast: Pharrell, Eric Church, Imagine Dragons + More Listen above, or click here to stream/download in iTunes.

Prior to his first Hot 100 top 10, Legend had reached a No. 24 highpoint with two songs: "Ordinary People" in 2005 and "Green Light," featuring Andre 3000, in 2008.

Rounding out the Hot 100's top five, Beyonce and featured artist/husband Jay Z hold at No. 5 with their No. 2-peaking "Drunk in Love." With a 12-9 advance on Radio Songs (92 million, up 9%), the track becomes Beyonce's 15th top 10 on the tally (and first since Lady Gaga's "Telephone," featuring Beyonce, in 2010) and Jay Z's 17th. (Beyonce notched another 10 Radio Songs top 10s with Destiny's Child in 1999-2005.)

Billboard 200: 'Frozen' Earns Most Weeks At

No. 1 For A Soundtrack Since 'Titanic'

In the second half of the Hot 100's top 10, Bastille's "Pompeii" rises 8-6 (a new peak) on the Hot 100 and leads Hot Rock Songs for a second week; Lorde's "Team" also reaches a new peak (9-7); A Great Big World and Christina Aguilera's "Say Something" falls to No. 8 from its No. 4 peak; OneRepublic's No. 2 hit "Counting Stars" descends 6-9; and Pitbull's former three-week No. 1 "Timber," featuring Ke$ha, slides 7-10.

*Quiz answer: Prior to Pharrell Williams' "Happy," four songs with the word "happy" in their titles topped the Hot 100: Dave "Baby Cortez's "The Happy Organ"(1959); Jimmy Soul's "If You Wanna Be Happy" (1963); the Turtles' "Happy Together" (1967); and Bobby McFerrin's "Don't Worry, Be Happy" (1988). (Meanwhile, optimists will be, well, happy, to know that only two songs with the word "sad" in their titles have led the chart: Robert John's "Sad Eyes" in 1979 and Billy Ocean's "There'll Be Sad Songs (To Make You Cry)" in 1986.)

Visit Billboard.com tomorrow (Feb. 27), when all rankings, including the Hot 100 in its entirety and Digital Songs, Radio Songs, Streaming Songs and On-Demand Songs, will refresh, as they do each Thursday. The latest charts will also appear in the next issue of Billboard magazine (on sale on Friday, Feb. 28).