text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
[? Upper ?] converts
a string like Farmers | 4,492.17 | 3.45 |
working at dawn to be all in
uppercase, kind of shout it out. | 4,495.62 | 3.87 |
And that's useful for us here because
we could kind of force everything | 4,499.49 | 3.57 |
to uppercase, thereby removing any
inconsistencies in capitalization. | 4,503.06 | 4.78 |
So let me try that. | 4,507.84 | 1.11 |
I'll say UPDATE, again,
the "votes" table. | 4,508.95 | 3.18 |
And this time, I'll set "title" equal
to the uppercase version of "title." | 4,512.13 | 6.35 |
So upper here is a
function in SQLite that | 4,518.48 | 3.72 |
takes some values associated with
the column and [? uppercases ?] | 4,522.2 | 3.33 |
the entire thing to remove any
inconsistencies in capitalization. | 4,525.53 | 4.89 |
Again, no condition here, because
I want to apply this to all rows. | 4,530.42 | 4.2 |
I'll hit Enter. | 4,534.62 | 1.11 |
And now if I SELECT [? star ?]
FROM "collections" semicolon-- | 4,535.73 | 5.61 |
oops, SELECT [? star ?]
FROM "votes," in this case-- | 4,541.34 | 2.278 |
no longer as collections table. | 4,543.618 | 1.292 |
I'll say SELECT [? star ?]
FROM "votes" semicolon, | 4,544.91 | 3.12 |
I should see all of
my titles capitalized. | 4,548.03 | 3.36 |
But now, I want to group by. | 4,551.39 | 1.74 |
So let's try this. | 4,553.13 | 0.93 |
I'll go up arrow to get back to my old
query that GROUP BY "title," hit Enter. | 4,554.06 | 6.06 |
And now, we're still
making some more progress. | 4,560.12 | 2.64 |
I'm reducing my number of
groups until I get to 4. | 4,562.76 | 3.21 |
But there's still some typos, like
we see Famers working at dawn, | 4,565.97 | 4.29 |
or Farmers working, or
Farmesr working at dawn. | 4,570.26 | 3.87 |
We want these to be included
as part of this group-- | 4,574.13 | 2.43 |
Farmers working at dawn. | 4,576.56 | 2.31 |
So we should fix some
of these typos here. | 4,578.87 | 3.37 |
Let me go back to my [? TERMINAL. ?]
Now, let's try this out. | 4,582.24 | 3.14 |
I could, in this case, just
manually correct these. | 4,585.38 | 3.66 |
You could imagine me
doing something like this. | 4,589.04 | 2.13 |
UPDATE "votes" and SET the
"title" equal to all caps | 4,591.17 | 5.73 |
"FARMERS WORKING AT DAWN," now
including a condition, WHERE the "title" | 4,596.9 | 6.27 |
presently is equal to for "FAMERS
WORKING" like this, semicolon-- | 4,603.17 | 7.447 |
or not Famers work-- | 4,610.617 | 0.833 |
I think it's Farmers Working, just all-- | 4,611.45 | 3.03 |
in two words. | 4,614.48 | 1.14 |
That was one title we saw. | 4,615.62 | 1.083 |
[? TRANSCRIPT BREAK ?] | 4,616.703 | 0.917 |
SPEAKER: I could manually
update it a bit like this. | 4,617.62 | 2.33 |
Let me hit Enter, and
let me do the same query | 4,619.95 | 2.66 |
by hitting the up arrow on my keyboard. | 4,622.61 | 2.94 |
Let me find this one,
hit Enter, and now we | 4,625.55 | 2.36 |
can see that that title,
"Farmers Working," | 4,627.91 | 2.97 |
is now just part of the main group. | 4,630.88 | 2.16 |
"Farmers Working At Dawn." | 4,633.04 | 2.43 |
I could keep going here. | 4,635.47 | 1.57 |
I could try to convert "Farmers Working
At Dawn" to "Farmers Working At Dawn." | 4,637.04 | 4.52 |
Let me try it. | 4,641.56 | 0.94 |
I could say select. | 4,642.5 | 1.61 |
Let's say-- not select. | 4,644.11 | 1.842 |
Let me update. | 4,645.952 | 0.583 |
Let me update in this
case votes, and set | 4,646.535 | 3.155 |
title equal to "Farmers Working
At Dawn" where the title equals | 4,649.69 | 7.65 |
in this case "Farmers Working At Dawn." | 4,657.34 | 3.99 |
Semicolon, Enter, let me hit up arrow
to go back to my old query to group by, | 4,661.33 | 6 |
and now we're getting somewhere. | 4,667.33 | 1.56 |
I'm seeing now only two groups
for "Farmers Working At Dawn," | 4,668.89 | 3.48 |
but one more to fix. | 4,672.37 | 2.82 |
Now we'd be here for a while
if I spend all this time | 4,675.19 | 3.96 |
one by one fixing these typos,
so there's probably a better way. | 4,679.15 | 5.23 |
There is. | 4,684.38 | 0.77 |
This one is going to be
using the like keyword. | 4,685.15 | 2.94 |
We don't have to say equal so much. | 4,688.09 | 2.25 |
We can just say like. | 4,690.34 | 1.5 |
Now, I could try to match any title that
looks like "Farmers Working At Dawn" | 4,691.84 | 5.01 |
and update it to be the correct title. | 4,696.85 | 2.55 |
So let's try that here. | 4,699.4 | 1.99 |
I could now try update votes and
set title equal to "Farmers Working | 4,701.39 | 7.76 |
At Dawn." | 4,709.15 | 1.83 |
"Farmers Working At Dawn"
where the title is like-- | 4,710.98 | 7.51 |
the title is like some
pattern I could give. | 4,718.49 | 3.51 |
Now for this data set, it turns out that
the only artwork that begins with F-A | 4,722 | 6.21 |
is Farmers Working At Dawn. | 4,728.21 | 1.77 |
So to match any title with F-A
and then anything afterwards, | 4,729.98 | 5.13 |
I could use F-A percent, and
then close out that pattern. | 4,735.11 | 6 |
Notice how I don't have to
have consistent capitalization. | 4,741.11 | 3.69 |
Like is case insensitive, and
notice how, too, the percent matches | 4,744.8 | 4.62 |
anything that comes after F-A.
Now in this data set, this is OK, | 4,749.42 | 6.45 |
but in a larger data set, you probably
want to avoid this kind of query | 4,755.87 | 4.62 |
because you could match much more
than Farmers Working At Dawn. | 4,760.49 | 3.09 |
You'd match anything that begins
with F-A, so be careful with this | 4,763.58 | 4.02 |
and think through what pattern
should you use to fix up your titles. | 4,767.6 | 4.77 |
Let me just hit Enter here, and now
let me try hitting up arrow again | 4,772.37 | 3.75 |
to show you the result, and now
we're in a pretty good place. | 4,776.12 | 4.41 |
I see all of my titles like Farmers
Working At Dawn are correctly | 4,780.53 | 4.29 |
capitalized, consistently
spelled, and all in one place. | 4,784.82 | 5.53 |
OK, let's try the others here. | 4,790.35 | 1.85 |
I also have "Imaginative landscape
which could be a little bit | 4,792.2 | 3.33 |
better designed here. | 4,795.53 | 1.26 |
A little bit better grouped as
well by fixing some of these typos. | 4,796.79 | 3.42 |
Well, here, I could try to
match on to maybe imaginative. | 4,800.21 | 4.98 |
That seems like a long enough word
that it could be useful for me here. | 4,805.19 | 3.19 |
So I'll say something like select-- | 4,808.38 | 1.88 |
not select. | 4,810.26 | 0.51 |
I'll do update votes and set the title
equal to "Imaginative Landscape." | 4,810.77 | 8.28 |
Now I want to match any rows that
have a title like "Imaginative space | 4,819.05 | 7.59 |
percent," end quote, semicolon. | 4,826.64 | 3.51 |
Now I'll match any title that
has imaginative as a full word | 4,830.15 | 4.86 |
at the very beginning of this phrase. | 4,835.01 | 2.64 |
This is, I would say,
a better query than F-A | 4,837.65 | 3.45 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.