Event JSON
{
"id": "db42e26c3354b453c2ce1a9a71ac985ba451565f58c75d5921c565142fa8e2dd",
"pubkey": "54295cb470d978a9d46c65a02c8a94f6eddf3f0a57bd536e72b18b557fff67c5",
"created_at": 1768913480,
"kind": 1,
"tags": [
[
"t",
"sql"
],
[
"t",
"postgresql"
],
[
"proxy",
"https://chaos.social/users/jspath55/statuses/115927513874560598",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content": "On a minor spreadsheet to database project, trying to split a single column into either \"cast\" or \"crew\" based on positions (\"Stage Manager\") and almost forgot NULL equates. #SQL \n\nselect\n cast_crew,\n person,\n role\n from\n cast_cooked\nwhere\n role in (\n select\n role\n from\n cast_cooked\n where\n cast_crew = 'crew'\n group by role\n)\nand\n cast_crew is NULL\n; \n\nHandy pick-up on enum in #PostgreSQL, behind the scenes limits choices: 'cast' or 'crew'.\n\nhttps://dba.stackexchange.com/questions/329261/making-use-of-enum-in-constraint",
"sig": "239d166ef603ded043216ceaf3a1fd3c7103f1aad37303189928c4228478bab81f4a85419c06c3dedd39d6776925a3ce725fc004804e29c4c79c747289757494"
}