home / russian-ads

russian-ads

Custom SQL query returning 111 rows

select
    target_id,
    targets.name,
    count(*) as n,
    json_object(
        "href", "/russian-ads/faceted-targets?targets=" || urllib_quote_plus(
            json_insert(:targets, '$[' || json_array_length(:targets) || ']', target_id)
        ),
        "label", json_insert(:targets, '$[' || json_array_length(:targets) || ']', target_id)
    ) as apply_this_facet,
    json_object(
        "href", "/russian-ads/display_ads?_targets_json=" || urllib_quote_plus(
            json_insert(:targets, '$[' || json_array_length(:targets) || ']', target_id)
        ),
        "label", "See " || count(*) || " ads matching " || json_insert(:targets, '$[' || json_array_length(:targets) || ']', target_id)
    ) as browse_these_ads
from ad_targets
join targets on ad_targets.target_id = targets.id
where
    json_array_length(:targets) == 0 or
    ad_id in (
        select ad_id
        from "ad_targets"
        where "ad_targets".target_id in (select value from json_each(:targets))
        group by "ad_targets".ad_id
        having count(distinct "ad_targets".target_id) = json_array_length(:targets)
    )
    and target_id not in (select value from json_each(:targets))
group by
    target_id order by n desc

Query parameters

target_idnamenapply_this_facetbrowse_these_ads
59d75 language:English (US) 93 ['f788a', '59d75'] See 93 ads matching ["f788a","59d75"]
862ed people_who_match:interests:Jr. 89 ['f788a', '862ed'] See 89 ads matching ["f788a","862ed"]
8a7ee people_who_match:interests:Martin Luther King 89 ['f788a', '8a7ee'] See 89 ads matching ["f788a","8a7ee"]
b1201 placements:News Feed on mobile devices 89 ['f788a', 'b1201'] See 89 ads matching ["f788a","b1201"]
e6200 placements:News Feed on desktop computers 89 ['f788a', 'e6200'] See 89 ads matching ["f788a","e6200"]
5e075 language:English (UK) 87 ['f788a', '5e075'] See 87 ads matching ["f788a","5e075"]
e128e people_who_match:interests:Black (Color) 86 ['f788a', 'e128e'] See 86 ads matching ["f788a","e128e"]
27369 people_who_match:interests:Malcolm X 84 ['f788a', '27369'] See 84 ads matching ["f788a","27369"]
371f0 age:18 - 65+ 79 ['f788a', '371f0'] See 79 ads matching ["f788a","371f0"]
abb72 people_who_match:interests:African-American history 56 ['f788a', 'abb72'] See 56 ads matching ["f788a","abb72"]
cc5ed location_living_in:United States 54 ['f788a', 'cc5ed'] See 54 ads matching ["f788a","cc5ed"]
3da9b excluded_connections:Exclude people who like Pan-African roots MOVE 51 ['f788a', '3da9b'] See 51 ads matching ["f788a","3da9b"]
a1307 people_who_match:interests:African-American Civil Rights Movement (1954—68) 51 ['f788a', 'a1307'] See 51 ads matching ["f788a","a1307"]
18a64 people_who_match:interests:Black Power 38 ['f788a', '18a64'] See 38 ads matching ["f788a","18a64"]
7c38f people_who_match:interests:Black Panther Party 37 ['f788a', '7c38f'] See 37 ads matching ["f788a","7c38f"]
809af people_who_match:interests:Black History Month 35 ['f788a', '809af'] See 35 ads matching ["f788a","809af"]
01e8a and_must_also_match:interests:Right of self—defense 30 ['f788a', '01e8a'] See 30 ads matching ["f788a","01e8a"]
2aa57 and_must_also_match:interests:Self Defense Family 30 ['f788a', '2aa57'] See 30 ads matching ["f788a","2aa57"]
425d7 and_must_also_match:interests:Active Self Protection 30 ['f788a', '425d7'] See 30 ads matching ["f788a","425d7"]
66f82 people_who_match:interests:African American 30 ['f788a', '66f82'] See 30 ads matching ["f788a","66f82"]
724f8 and_must_also_match:interests:The Women's Self Defense Institute 30 ['f788a', '724f8'] See 30 ads matching ["f788a","724f8"]
7c580 and_must_also_match:interests:Martial arts 30 ['f788a', '7c580'] See 30 ads matching ["f788a","7c580"]
8b0bf and_must_also_match:interests:Personal Defense 30 ['f788a', '8b0bf'] See 30 ads matching ["f788a","8b0bf"]
93975 people_who_match:interests:Angela Davis 30 ['f788a', '93975'] See 30 ads matching ["f788a","93975"]
9c206 and_must_also_match:interests:Mixed martial arts 30 ['f788a', '9c206'] See 30 ads matching ["f788a","9c206"]
b6f60 and_must_also_match:interests:PERSONAL & HOME DEFENSE 30 ['f788a', 'b6f60'] See 30 ads matching ["f788a","b6f60"]
9848a people_who_match:interests:African- American Civil Rights Movement (1954—68) 29 ['f788a', '9848a'] See 29 ads matching ["f788a","9848a"]
ebf60 people_who_match:interests:Pan-Africanism 27 ['f788a', 'ebf60'] See 27 ads matching ["f788a","ebf60"]
06d39 and_must_also_match:interests:SeIf-defense 24 ['f788a', '06d39'] See 24 ads matching ["f788a","06d39"]
2ab82 and_must_also_match:interests:Self- defense (United States) 24 ['f788a', '2ab82'] See 24 ads matching ["f788a","2ab82"]
8d2e9 people_who_match:interests:African- American history 21 ['f788a', '8d2e9'] See 21 ads matching ["f788a","8d2e9"]
df1f0 people_who_match:interests:African- American culture 21 ['f788a', 'df1f0'] See 21 ads matching ["f788a","df1f0"]
37724 people_who_match:interests:Self Defense Family 19 ['f788a', '37724'] See 19 ads matching ["f788a","37724"]
80def people_who_match:interests:The Self Defense Company 19 ['f788a', '80def'] See 19 ads matching ["f788a","80def"]
d5ec6 people_who_match:interests:Martial arts 19 ['f788a', 'd5ec6'] See 19 ads matching ["f788a","d5ec6"]
7b150 age:18 — 65+ 16 ['f788a', '7b150'] See 16 ads matching ["f788a","7b150"]
ebcbb location_living_in:united_states:New York (+25 mi) New York 16 ['f788a', 'ebcbb'] See 16 ads matching ["f788a","ebcbb"]
a2d21 people_who_match:interests:African-American culture 15 ['f788a', 'a2d21'] See 15 ads matching ["f788a","a2d21"]
d2749 people_who_match:interests:African— American culture 13 ['f788a', 'd2749'] See 13 ads matching ["f788a","d2749"]
ec3ac location:United States 10 ['f788a', 'ec3ac'] See 10 ads matching ["f788a","ec3ac"]
902e5 placements:Right column on desktop computers 9 ['f788a', '902e5'] See 9 ads matching ["f788a","902e5"]
d1aa5 people_who_match:interests:My Black is Beautiful 8 ['f788a', 'd1aa5'] See 8 ads matching ["f788a","d1aa5"]
2ce65 people_who_match:interests:Black is beautiful 7 ['f788a', '2ce65'] See 7 ads matching ["f788a","2ce65"]
3502d placements:Instagram Feed 7 ['f788a', '3502d'] See 7 ads matching ["f788a","3502d"]
d65e1 people_who_match:interests:Fight the Power 7 ['f788a', 'd65e1'] See 7 ads matching ["f788a","d65e1"]
13ab6 people_who_match:interests:Pan—Africanism 6 ['f788a', '13ab6'] See 6 ads matching ["f788a","13ab6"]
39ce1 and_must_also_match:interests:Self— defense (United States) 6 ['f788a', '39ce1'] See 6 ads matching ["f788a","39ce1"]
6d811 and_must_also_match:interests:SeIf—defense 6 ['f788a', '6d811'] See 6 ads matching ["f788a","6d811"]
3fbed people_who_match:interests:African-Amerioan history 5 ['f788a', '3fbed'] See 5 ads matching ["f788a","3fbed"]
4225c people_who_match:interests:African—American history 5 ['f788a', '4225c'] See 5 ads matching ["f788a","4225c"]
04e82 people_who_match:interests:Malcolm X or Black (Color) 4 ['f788a', '04e82'] See 4 ads matching ["f788a","04e82"]
4f515 location_living_in:united_states:Long Beach (+25 mi) California 4 ['f788a', '4f515'] See 4 ads matching ["f788a","4f515"]
e4503 excluded_connections:Exclude people who like Nefertiti's Community 4 ['f788a', 'e4503'] See 4 ads matching ["f788a","e4503"]
1d2ab people_who_match:interests:African—American Civil Rights Movement (1954—68) 3 ['f788a', '1d2ab'] See 3 ads matching ["f788a","1d2ab"]
5ea35 people_who_match:interests:Black Arts Movement 3 ['f788a', '5ea35'] See 3 ads matching ["f788a","5ea35"]
65f5f people_who_match:interests:Afrocentric education 3 ['f788a', '65f5f'] See 3 ads matching ["f788a","65f5f"]
72a45 people_who_match:interests:Malcolm X (EI-Hajj Malik EI-Shabazz) 3 ['f788a', '72a45'] See 3 ads matching ["f788a","72a45"]
94bdc people_who_match:interests:Multicultural Affinity: African American (US) 3 ['f788a', '94bdc'] See 3 ads matching ["f788a","94bdc"]
9c17e location_living_in:united_states:Lansing (+25 mi) Michigan 3 ['f788a', '9c17e'] See 3 ads matching ["f788a","9c17e"]
a5ab5 people_who_match:interests:African-Amerioan culture 3 ['f788a', 'a5ab5'] See 3 ads matching ["f788a","a5ab5"]
a8e8b location:united_states:Astoria (+25 mi) New York 3 ['f788a', 'a8e8b'] See 3 ads matching ["f788a","a8e8b"]
1518e people_who_match:interests:Behaviors: African American (US) 2 ['f788a', '1518e'] See 2 ads matching ["f788a","1518e"]
27335 excluded_connections:Exclude people who like Woke Blacks 2 ['f788a', '27335'] See 2 ads matching ["f788a","27335"]
6b1c5 location_living_in:united_states:Astoria (+50 mi) New York 2 ['f788a', '6b1c5'] See 2 ads matching ["f788a","6b1c5"]
6f328 people_who_match:interests:Afrocentrism 2 ['f788a', '6f328'] See 2 ads matching ["f788a","6f328"]
7746b people_who_match:interests:Black Girls Rock! 2 ['f788a', '7746b'] See 2 ads matching ["f788a","7746b"]
943de and_must_also_match:interests:Pan-Africanism 2 ['f788a', '943de'] See 2 ads matching ["f788a","943de"]
cd49b excluded_connections:Exclude people who like Pan—African roots MOVE 2 ['f788a', 'cd49b'] See 2 ads matching ["f788a","cd49b"]
da17a people_who_match:interests:Melanin 2 ['f788a', 'da17a'] See 2 ads matching ["f788a","da17a"]
ddd45 people_who_match:interests:The African History Network 2 ['f788a', 'ddd45'] See 2 ads matching ["f788a","ddd45"]
0184a people_who_match:interests:madeas family reunion 1 ['f788a', '0184a'] See 1 ads matching ["f788a","0184a"]
03c04 people_who_match:interests:African-American literature 1 ['f788a', '03c04'] See 1 ads matching ["f788a","03c04"]
1b9ce people_who_match:interests:The Honorable Minister Louis Farrakhan 1 ['f788a', '1b9ce'] See 1 ads matching ["f788a","1b9ce"]
21d2b people_who_match:interests:Jesse Jackson 1 ['f788a', '21d2b'] See 1 ads matching ["f788a","21d2b"]
2d05d location_living_in:united_states:Alabama; Florida; Georgia; Illinois; Louisiana; Mississippi; New York; South Carolina; Virginia 1 ['f788a', '2d05d'] See 1 ads matching ["f788a","2d05d"]
302cc people_who_match:interests:Black Girls Rock! or HuffPost Black Voices 1 ['f788a', '302cc'] See 1 ads matching ["f788a","302cc"]
40b91 people_who_match:interests:BlackNews.com 1 ['f788a', '40b91'] See 1 ads matching ["f788a","40b91"]
41b26 people_who_match:interests:Black Consciousness Movement 1 ['f788a', '41b26'] See 1 ads matching ["f788a","41b26"]
487f2 people_who_match:interests:African-Amerioan Civil Rights Movement (1954—68) 1 ['f788a', '487f2'] See 1 ads matching ["f788a","487f2"]
4e343 people_who_match:interests:The Autobiography of Malcolm X 1 ['f788a', '4e343'] See 1 ads matching ["f788a","4e343"]
4e97e location_living_in:united_states:Atlanta (+25 mi) Georgia 1 ['f788a', '4e97e'] See 1 ads matching ["f788a","4e97e"]
57006 location:united_states:New York 1 ['f788a', '57006'] See 1 ads matching ["f788a","57006"]
61c1a age:18 - 50 1 ['f788a', '61c1a'] See 1 ads matching ["f788a","61c1a"]
629a9 people_who_match:interests:Social Justice Solutions 1 ['f788a', '629a9'] See 1 ads matching ["f788a","629a9"]
6967b people_who_match:interests:Sister 2 Sister magazine 1 ['f788a', '6967b'] See 1 ads matching ["f788a","6967b"]
6a05f people_who_match:interests:New Black Panther Party 1 ['f788a', '6a05f'] See 1 ads matching ["f788a","6a05f"]
6d746 people_who_match:interests:California African American Museum 1 ['f788a', '6d746'] See 1 ads matching ["f788a","6d746"]
7d615 people_who_match:interests:African American Museum in Philadelphia 1 ['f788a', '7d615'] See 1 ads matching ["f788a","7d615"]
7db85 people_who_match:interests:Rosa Parks 1 ['f788a', '7db85'] See 1 ads matching ["f788a","7db85"]
83017 people_who_match:interests:Leadership development 1 ['f788a', '83017'] See 1 ads matching ["f788a","83017"]
91693 people_who_match:interests:African—American culture 1 ['f788a', '91693'] See 1 ads matching ["f788a","91693"]
9295b people_who_match:interests:Racial equality 1 ['f788a', '9295b'] See 1 ads matching ["f788a","9295b"]
9de73 people_who_match:interests:Racial integration 1 ['f788a', '9de73'] See 1 ads matching ["f788a","9de73"]
9fe34 people_who_match:interests:Understanding racial segregation in the united states 1 ['f788a', '9fe34'] See 1 ads matching ["f788a","9fe34"]
a8c8f people_who_match:interests:Leadership 1 ['f788a', 'a8c8f'] See 1 ads matching ["f788a","a8c8f"]
b322d people_who_match:interests:Pan-Afrioanism 1 ['f788a', 'b322d'] See 1 ads matching ["f788a","b322d"]
b63d4 people_who_match:interests:Black is beautiful or Cop Block 1 ['f788a', 'b63d4'] See 1 ads matching ["f788a","b63d4"]
b73e3 people_who_match:interests:Sister 2 Sister 1 ['f788a', 'b73e3'] See 1 ads matching ["f788a","b73e3"]
b8132 girls_rock_behaviors:Field of study: African- American history 1 ['f788a', 'b8132'] See 1 ads matching ["f788a","b8132"]
bcc1d people_who_match:interests:World Day of Social Justice 1 ['f788a', 'bcc1d'] See 1 ads matching ["f788a","bcc1d"]
c3801 people_who_match:interests:Black 1 ['f788a', 'c3801'] See 1 ads matching ["f788a","c3801"]
c4d21 location_living_in:united_states:Orlando (+50 mi) Florida 1 ['f788a', 'c4d21'] See 1 ads matching ["f788a","c4d21"]
c69e6 people_who_match:interests:Field of study: African-American history 1 ['f788a', 'c69e6'] See 1 ads matching ["f788a","c69e6"]
d6347 people_who_match:interests:Black nationalism 1 ['f788a', 'd6347'] See 1 ads matching ["f788a","d6347"]
d75c0 people_who_match:interests:HuffPost Black Voices 1 ['f788a', 'd75c0'] See 1 ads matching ["f788a","d75c0"]
d84e6 people_who_match:interests:Phaedra Parks 1 ['f788a', 'd84e6'] See 1 ads matching ["f788a","d84e6"]
e42ca people_who_match:interests:Slavery by Another Name 1 ['f788a', 'e42ca'] See 1 ads matching ["f788a","e42ca"]
ecfcb girls_rock_behaviors:African American (US) 1 ['f788a', 'ecfcb'] See 1 ads matching ["f788a","ecfcb"]
f32e5 people_who_match:interests:Pan-Africahism 1 ['f788a', 'f32e5'] See 1 ads matching ["f788a","f32e5"]
f431c people_who_match:interests:African— American history 1 ['f788a', 'f431c'] See 1 ads matching ["f788a","f431c"]
f44e6 people_who_match:interests:Bias 1 ['f788a', 'f44e6'] See 1 ads matching ["f788a","f44e6"]
Powered by Datasette · Query took 26.398ms