[INST] Here is a database schema:
cards :
id [ INTEGER ] primary_key
artist [ TEXT ]
asciiName [ TEXT ]
availability [ TEXT ]
borderColor [ TEXT ]
cardKingdomFoilId [ TEXT ]
cardKingdomId [ TEXT ]
colorIdentity [ TEXT ]
colorIndicator [ TEXT ]
colors [ TEXT ]
convertedManaCost [ REAL ]
duelDeck [ TEXT ]
edhrecRank [ INTEGER ]
faceConvertedManaCost [ REAL ]
faceName [ TEXT ]
flavorName [ TEXT ]
flavorText [ TEXT ]
frameEffects [ TEXT ]
frameVersion [ TEXT ]
hand [ TEXT ]
hasAlternativeDeckLimit [ INTEGER ]
hasContentWarning [ INTEGER ]
hasFoil [ INTEGER ]
hasNonFoil [ INTEGER ]
isAlternative [ INTEGER ]
isFullArt [ INTEGER ]
isOnlineOnly [ INTEGER ]
isOversized [ INTEGER ]
isPromo [ INTEGER ]
isReprint [ INTEGER ]
isReserved [ INTEGER ]
isStarter [ INTEGER ]
isStorySpotlight [ INTEGER ]
isTextless [ INTEGER ]
isTimeshifted [ INTEGER ]
keywords [ TEXT ]
layout [ TEXT ]
leadershipSkills [ TEXT ]
life [ TEXT ]
loyalty [ TEXT ]
manaCost [ TEXT ]
mcmId [ TEXT ]
mcmMetaId [ TEXT ]
mtgArenaId [ TEXT ]
mtgjsonV4Id [ TEXT ]
mtgoFoilId [ TEXT ]
mtgoId [ TEXT ]
multiverseId [ TEXT ]
name [ TEXT ]
number [ TEXT ]
originalReleaseDate [ TEXT ]
originalText [ TEXT ]
originalType [ TEXT ]
otherFaceIds [ TEXT ]
power [ TEXT ]
printings [ TEXT ]
promoTypes [ TEXT ]
purchaseUrls [ TEXT ]
rarity [ TEXT ]
scryfallId [ TEXT ]
scryfallIllustrationId [ TEXT ]
scryfallOracleId [ TEXT ]
setCode [ TEXT ]
side [ TEXT ]
subtypes [ TEXT ]
supertypes [ TEXT ]
tcgplayerProductId [ TEXT ]
text [ TEXT ]
toughness [ TEXT ]
type [ TEXT ]
types [ TEXT ]
uuid [ TEXT ]
variations [ TEXT ]
watermark [ TEXT ]

foreign_data :
id [ INTEGER ] primary_key
flavorText [ TEXT ]
language [ TEXT ]
multiverseid [ INTEGER ]
name [ TEXT ]
text [ TEXT ]
type [ TEXT ]
uuid [ TEXT ] foreign_data.uuid = cards.uuid

legalities :
id [ INTEGER ] primary_key
format [ TEXT ]
status [ TEXT ]
uuid [ TEXT ] legalities.uuid = cards.uuid

sets :
id [ INTEGER ] primary_key
baseSetSize [ INTEGER ]
block [ TEXT ]
booster [ TEXT ]
code [ TEXT ]
isFoilOnly [ INTEGER ]
isForeignOnly [ INTEGER ]
isNonFoilOnly [ INTEGER ]
isOnlineOnly [ INTEGER ]
isPartialPreview [ INTEGER ]
keyruneCode [ TEXT ]
mcmId [ INTEGER ]
mcmIdExtras [ INTEGER ]
mcmName [ TEXT ]
mtgoCode [ TEXT ]
name [ TEXT ]
parentCode [ TEXT ]
releaseDate [ DATE ]
tcgplayerGroupId [ INTEGER ]
totalSetSize [ INTEGER ]
type [ TEXT ]

set_translations :
id [ INTEGER ] primary_key
language [ TEXT ]
setCode [ TEXT ] set_translations.setCode = sets.code
translation [ TEXT ]

rulings :
id [ INTEGER ] primary_key
date [ DATE ]
text [ TEXT ]
uuid [ TEXT ] rulings.uuid = cards.uuid

Please write me a SQL statement that answers the following question: Among the cards whose version of frame style is 1997, what is the status of the card illustrated by D. Alexander Gregory in legacy play format that has sensitive content or Wizards of the Coast? [/INST]
SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.frameVersion = 1997 AND T1.hasContentWarning = 1 AND T1.artist = 'D. Alexander Gregory' AND T2.format = 'legacy';