nbtのデータを条件に実行するexecuteコマンド

/execute if entity @s[nbt={Inventory:[{id:"minecraft:stick"}]}] run tp @s ~ ~2 ~

上記、コマンドは
コマンド実行者の イベントリ内にminecraft:stickが有る時に
2マス上にテレポートする。