行後直接我有以下的列SQL服務器:只有行過濾包含特定文本
application_uuid
changed_at_utc
changed_by
name
我謹application_uuid
和changed_at_utc
排序表。然後,我要篩選只排在那裏application_status
具有文本「準備打分」後直接過來的行
Python和熊貓,我會做這樣的事情...
application_statuses = application_statuses.sort_values(['application_uuid', 'changed_at_utc'], ascending=[True, True]).reset_index(drop=True)
indexes = application_statuses[application_statuses['application_status']=='Ready for Scoring'].index + 1
next_statuses = application_statuses.ix[indexes]
我怎樣才能使用SQL做同樣的事情?
您能否顯示一些示例數據和預期結果? –