blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
a989f646d56811da3c10569324ffa7227991eb74 | SQL | jaquelinebonoto/EstagioVemSer | /modulo03/Exercicios/TrabalhoSpring/CREATE.sql | UTF-8 | 1,011 | 3.5 | 4 | [] | no_license | CREATE TABLE FILME (ID NUMBER NOT NULL PRIMARY KEY , TITULO VARCHAR2(50) NOT NULL, LANCAMENTO DATE, CATEGORIA VARCHAR2(50));
CREATE TABLE MIDIA(ID NUMBER NOT NULL PRIMARY KEY, TIPODEMIDIA VARCHAR2(50) NOT NULL, QUANTIDADE INTEGER);
CREATE TABLE VALOR_MIDIA (ID NUMBER NOT NULL PRIMARY KEY, VALOR DOUBLE, INICIOVIGENCIA D... | true |
bd11120b0b2409c665b4d64a6eefbf5b7c0615d0 | SQL | huangfushengkun/zuixin-mini-sever | /sql/types.sql | UTF-8 | 1,537 | 3.078125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : huangfushengkun
Source Server Version : 50505
Source Host : localhost:3306
Source Database : wolong
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2020-01-06 20:17:20
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
56db98580ff0091f7651510b35eb0f7aa0d424a1 | SQL | PendekantiNagendra/Mode2 | /sql database/sql department.sql | UTF-8 | 329 | 2.96875 | 3 | [] | no_license | create table department
(
deptno int primary key,
dname varchar(30),
loc varchar(300),
head varchar(30)
);
insert into department values(1, 'java', 'parlin', 'matt'),
(2, 'dotnet', 'detroit', 'prior'),
(3, 'SAP', 'piscaptsway', 'scott'),
(4, 'HRM', 'delaware', 'adam'),
(5, 'SQL', 'hollywood', 'steve')
select * from D... | true |
d77994e47719d474482b313b04d9630e903554ba | SQL | ezcater/WhereHows | /wherehows-data-model/DDL/postgres/ETL_DDL/lineage_metadata.sql | UTF-8 | 6,972 | 3.21875 | 3 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | --
-- Copyright 2015 LinkedIn Corp. All rights reserved.
-- Postgres conversion copyright 2018 ezCater, Inc. All rights reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- htt... | true |
d651b68644dbc9d6c18f10ec7a2bdd56dcead851 | SQL | chengwjy/tp6cms | /object.sql | UTF-8 | 1,515 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : 本地
Source Server Version : 50726
Source Host : localhost:3306
Source Database : object
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2020-10-10 17:24:09
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
3df19112036ec936ad2d4190fd7741bc81c1f9b6 | SQL | yaojie/springcloud----springboot | /aispringclouddemo/client/src/main/resources/static/ordersys.sql | UTF-8 | 4,842 | 3.4375 | 3 | [] | no_license | /*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.5.40 : Database - orderingsystem
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY... | true |
e8c2258bb283e2725e9eef9fbce89edadfc2a4f2 | SQL | bs-debugger/ShoppingMall | /live-admin/target/classes/init-table.sql | UTF-8 | 10,474 | 3.296875 | 3 | [] | no_license | /*
SQLyog Ultimate v8.32
MySQL - 5.5.23 : Database - yiya
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FO... | true |
18243078ad7ed42272eddd5c1a8ce41481b7639a | SQL | kubAretip/company-products-orders-api | /src/main/resources/db/migration/common/V1.1.4__add_order_product_table.sql | UTF-8 | 429 | 3.40625 | 3 | [] | no_license | create table if not exists order_product
(
id bigint not null auto_increment,
order_id bigint not null,
product_id bigint not null,
quantity int not null,
executor_user_id bigint,
primary key (id),
foreign key (order_id) references client_order (id),
... | true |
c7e7ad7a986f4450b75b0b3cff714edacf3f1ed0 | SQL | Aimintao/Oracle | /数据库初始化脚本/存储过程/P_GETEFEE.sql | UTF-8 | 224 | 2.59375 | 3 | [] | no_license | create or replace PROCEDURE P_GETEFEE
(
ename in "equipment"."e_name"%TYPE,efee out "equipment"."fee"%TYPE
)
AS
BEGIN
select "equipment"."fee" INTO efee FROM "equipment" WHERE "equipment"."e_name"=ename;
END P_GETEFEE; | true |
6c249a4bf90e63f59677698ed25df0401f498d04 | SQL | Biguee/automobile-repair-shop | /src/main/resources/sql/schema.sql | UTF-8 | 1,620 | 3.75 | 4 | [] | no_license | DROP TABLE IF EXISTS clients;
CREATE TABLE clients(
ID BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT,
NAME VARCHAR(40) NOT NULL ,
SURNAME VARCHAR(40) NOT NULL,
NIP VARCHAR(15) NOT NULL
);
DROP TABLE IF EXISTS parts;
CREATE TABLE parts(
ID BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT,
PART_NAME TEXT NOT NULL,
... | true |
33e8005ccf007d46ddeab5c8874ec50d2ce496ad | SQL | xianghuzhao/toolkit | /dirac-maintain/mysql/migration/v6r20p6_v6r22p3/ResourceManagementDB.sql | UTF-8 | 7,238 | 3.25 | 3 | [] | no_license | USE ResourceManagementDB;
DROP TABLE ErrorReportBuffer;
DROP TABLE PolicyResultHistory;
DROP TABLE PolicyResultLog;
DROP TABLE PolicyResultWithID;
DROP TABLE ResourceSAMStatus;
DROP TABLE ResourceSAMStatusLog;
DROP TABLE SAMResult;
DROP TABLE SAMResultLog;
DROP TABLE SiteSAMStatus;
DROP TABLE SiteSAMStatusLog;
DROP T... | true |
cb1f4fb686707ea43b182f7f36a439efffd749bd | SQL | JackHo327/data-engineering-nanodegree-udacity | /module 1. Introduction to Data Modeling/Project - data modeling with Postgres/exploratory_resources/template.sql | UTF-8 | 1,848 | 4.125 | 4 | [] | no_license | -- tempalte file for writing SQLs
-- mainly for doing reformat
-- CREATE TABLES
CREATE TABLE IF NOT EXISTS songplays (
songplay_id SERIAL PRIMARY KEY,
start_time timestamp,
user_id VARCHAR(256),
level VARCHAR(10),
song_id VARCHAR(256),
artist_id VARCHAR(256),
session_id INT,
location V... | true |
f09c06bc24a80f269b7797092c928ac1fe5a23a1 | SQL | lorenzofabrit/lab-advanced-mysql | /your-code/solutions.sql | UTF-8 | 1,997 | 4.03125 | 4 | [] | no_license | # Challenge 1 - Most Profiting Authors
SELECT au_id, royalty_aggreg + advance AS total_profits
FROM (SELECT au_id, title_id, sum(sales_royalty) AS royalty_aggreg, advance
FROM (SELECT au.au_id, ti.title_id,
ti.advance * ta.royaltyper / 100 AS advance,
ti.price * sa.qty * ti.royalty / 100 * ta.royaltyper / 100 ... | true |
173e58078873aa4d1bb6bfe68958b6f8bcb37cc1 | SQL | SATYAM9717069261/Chat-Application | /socialwebsite.sql | UTF-8 | 2,769 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 13, 2017 at 04:31 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... | true |
f8fa429f8c201b4b1db95b44da70bf44e4d49356 | SQL | alandev123/Car-Comparison | /wheelie.sql | UTF-8 | 7,414 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 18, 2018 at 06:43 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SE... | true |
18f5cea653871b76746daa1e07bfc5620f0f7637 | SQL | paulfcdd/7tech_test | /bin/dump.sql | UTF-8 | 7,695 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Янв 15 2018 г., 13:07
-- Версия сервера: 10.1.28-MariaDB
-- Версия PHP: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
49589b6fba370c7b39ba6a2ee74fc87d829f394f | SQL | Mikbac/SQL-notebook | /Projects/Shop-database-MSSQL/Views.sql | UTF-8 | 1,378 | 3.8125 | 4 | [] | no_license | -- --------widok1 - co kto zamowil--------
CREATE VIEW ZamowieniaUzytkownikow(imie, nazwisko, nazwa)
AS
(
SELECT imie, nazwisko, nazwa
FROM Uzytkownicy
LEFT OUTER JOIN Zamowienia z1 on idZamawiajacego=idUzytkownika
LEFT OUTER JOIN RealizacjeZamowien z2 on z1.idZamowienia=z2.idZamowienia
INNER JOIN Produkty p1 on p1... | true |
93a721b4b1b3a3d4511254b63b677d2010e83e00 | SQL | Ernesto11/API_Version1 | /DB/SP_obtener_categorias.sql | UTF-8 | 357 | 2.890625 | 3 | [] | no_license | DROP PROCEDURE IF EXISTS db_erp.obtener_categorias;
DELIMITER $$
CREATE PROCEDURE db_erp.obtener_categorias()
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION, SQLWARNING
BEGIN
ROLLBACK;
SELECT 'Error, No se puede procesar la consulta';
END;
START TRANSACTION;
Select * from categoria;
... | true |
8c6f58ede4344be54c0b88192a5014954296e4fd | SQL | jesuscervinicloud/bernardopriante | /scripts/PRI005/Update_all_inventarios_mas_2_anos_vigencia.sql | ISO-8859-10 | 556 | 3.1875 | 3 | [] | no_license | --Consulta que modifica la fecha de vigencia a 2 aos a todos los registros que tengan ao de inicio de vigencia 2017
--select i.VIGENCIA_INICIO, i.VIGENCIA_FIN, dateadd(2 YEAR to i.VIGENCIA_INICIO) from inventarios i where extract(year from i.VIGENCIA_INICIO) = 2017;
update INVENTARIOS i set i.VIGENCIA_FIN = dateadd... | true |
78b096bf4021bf02f5b640a2ae2318f8bf42e7a7 | SQL | nhatsmrt/DatabasePractice | /LeetCode/196. Delete Duplicate Emails/Solution.sql | UTF-8 | 151 | 3.03125 | 3 | [] | no_license | # Write your MySQL query statement below
DELETE p1 FROM Person p1
INNER JOIN Person p2
WHERE p1.Email = p2.Email
AND p1.Id > p2.Id
| true |
98678d45cfc85004d82624aefb4b3e57d2197c38 | SQL | imavishek/StairSupplies | /db/changes/2013/2013-08-28 - cleanup.sql | UTF-8 | 2,010 | 3.015625 | 3 | [] | no_license | ALTER TABLE `TblOrdersBOM`
CHANGE COLUMN `DateCreated` `DateCreated` DATETIME NULL DEFAULT NULL AFTER `hiddenInLateOrderRport`,
CHANGE COLUMN `DateUpdated` `DateUpdated` DATETIME NULL DEFAULT NULL AFTER `DateCreated`;
ALTER TABLE `Products`
CHANGE COLUMN `archived` `Archived` TINYINT(4) NULL DEFAULT '0' AFTER `Inve... | true |
d2109989a4a9d19f3acd25d393109c2ffc2293d4 | SQL | akbaker/erate | /fabric/import/puerto_rico.sql | UTF-8 | 944 | 2.890625 | 3 | [] | no_license | drop table if exists fabric.pr_ind;
CREATE TABLE fabric.pr_ind
(
school_code character varying(5),
school_name character varying(100),
region character varying(40),
district_name character varying(40),
town character varying(40),
status character varying(40),
address character varying(150),
telephone... | true |
1b521a73b466f0c022631996eda0f3f01ddc3a88 | SQL | rocky6122/DatabaseManagement | /In Class DB/EmpLogIn Code/3 test EmpLogIn process.sql | UTF-8 | 1,136 | 3.203125 | 3 | [] | no_license | use employees;
delete from Address where eaid = 163;
delete from Address where eaid = 164; -- Want to amke sure the Address table
-- is clear of these records
insert into Address values(163,"163 South Willard Street","Burlington","VT","05401");
insert into Employee values(163,"First","Name",163);
/*
If you... | true |
f4dad77d0ac2c496638b1d593dbdb967dd24a2fe | SQL | andrewLay/SQLZOO | /7. Using NULL.sql | UTF-8 | 1,742 | 3.96875 | 4 | [] | no_license | /*
teacher
id dept name phone mobile
101 1 Shrivell 2753 07986 555 1234
102 1 Throd 2754 07122 555 1920
103 1 Splint 2293
104 Spiregrain 3287
105 2 Cutflower 3212 07996 555 6574
106 Deadyawn 3345
...
dept
id... | true |
9a3079997c971d07841cfc17ceef936ce83fb778 | SQL | JoanQin/kmdata_db | /views/kmdata/kmdata.vw_Awardhonor.sql | UTF-8 | 1,549 | 3.421875 | 3 | [] | no_license | create or replace view kmdata.vw_awardhonor as
SELECT a.id, a.resource_id, a.user_id, a.monetary_amount, a.fellow_ind, d.name as follow_val,
a.institution_id, ins.name as institution_Val, a.monetary_component_ind, c.name as monetary_component_val,
a.honor_name, a.sponsor, a.subject, h.name as cip_Val, a.hon... | true |
2920f0c836a83b76b99eb94348318f2bcc6a743b | SQL | briispinventions/medical-website | /db/medicine.sql | UTF-8 | 14,806 | 3.84375 | 4 | [
"MIT"
] | permissive | -- Medicine Database
CREATE SCHEMA `medicine`;
USE `medicine`;
CREATE TABLE `medicine`.`medicine` (
`M_ID` INT NOT NULL AUTO_INCREMENT,
`Name` VARCHAR(45) NOT NULL,
`Dosage` VARCHAR(45) NULL,
`Price` FLOAT NULL,
PRIMARY KEY (`M_ID`),
UNIQUE INDEX `M_ID_UNIQUE` (`M_ID` ASC));
CREATE TABLE `medicine`.`med... | true |
f2edd387621ac34167ad648247fc1117d6d7a275 | SQL | TU-Liyanage/CarRent | /car_rent.sql | UTF-8 | 7,066 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 18, 2021 at 10:47 AM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
b2f349cde37bc9ae2e51ab1226eb747289d9a130 | SQL | env107/seckill_demo | /seckill_demo.sql | UTF-8 | 1,661 | 2.890625 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.6.38)
# Database: seckill_demo
# Generation Time: 2018-09-30 08:03:44 +0000
# ******************************************... | true |
f5592f587ab7136e77b70e0644ffc4371349e148 | SQL | P79N6A/fast | /install/efast365/api_yamaxun_order.sql | UTF-8 | 3,373 | 3.59375 | 4 | [] | no_license | -- ----------------------------
-- Table structure for api_yamaxun_order 银泰订单明细
-- ----------------------------
DROP TABLE IF EXISTS `api_yamaxun_order`;
CREATE TABLE `api_yamaxun_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`AmazonOrderId` varchar(150) DEFAULT '' COMMENT '亚马逊所定义的订单编码',
`OrderItemId` var... | true |
69ad03c809091c4d32269d9aeb8db16ca81fa877 | SQL | stefanMinch3v/SoftUni | /T-SQL-DbBasics2016-2017/8.Functions, Triggers, Transactions and Procedures/13.CalculatingInterest.sql | UTF-8 | 452 | 3.796875 | 4 | [] | no_license | ALTER PROC usp_CalculateFutureValueForAccount
(@AccountId int, @Interest float)
AS
SELECT ah.Id AS [Account Id],
ah.FirstName AS [First Name],
ah.LastName AS [Last Name],
a.Balance AS [Current Balance],
dbo.ufn_CalculateFutureValue (a.Balance, @Interest, 5) AS [Balance in 5 years]
FROM AccountHolders AS... | true |
6c0fe3c3e783225b89fa1088a79574fe3268e503 | SQL | serviceshuios/gtm-rouen-2018 | /java/bases de données/contacts.sql | UTF-8 | 9,902 | 2.796875 | 3 | [] | no_license | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
CREATE DATABASE IF NO... | true |
87ffb39543f334886d56709ff39786c88e97c4e6 | SQL | JoaoDiasDev/BancoDeDados | /SQL/MySQL/criarTabelasCidades.sql | UTF-8 | 399 | 3.265625 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS cidades(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
nome VARCHAR (255) NOT NULL,
estado_id INT UNSIGNED NOT NULL,
area DECIMAL (10, 2),
PRIMARY KEY(id),
FOREIGN KEY(estado_id) REFERENCES estados(id)
);
-- CREATE TABLE IF NOT EXISTS teste(
-- id INT UNSIGNED NOT NULL AUTO_INCREMENT... | true |
528a633731028e6b77877f630eb711e5a3ad92d0 | SQL | newtlouis/R-seau-social-d-entreprise--Groupomania | /groupomania.sql | UTF-8 | 2,961 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 17 août 2021 à 08:11
-- Version du serveur : 8.0.21
-- Version de PHP : 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
61b3882bfadb0fc0108d5bf5e2681cce1673779a | SQL | yamilburgos/Memedr | /memedr-express/models/schema.sql | UTF-8 | 1,688 | 3.96875 | 4 | [] | no_license | DROP DATABASE IF EXISTS memedr_app;
CREATE DATABASE memedr_app;
\c memedr_app;
CREATE TABLE IF NOT EXISTS users(
id BIGSERIAL PRIMARY KEY NOT NULL,
username VARCHAR(30) NOT NULL,
password VARCHAR(255) NOT NULL,
email VARCHAR(200) NOT NULL,
location VARCHAR(200) NOT NULL,
gender VARCHAR(6) NOT ... | true |
103be19cd615c1acb11298e6acc866195b01a18f | SQL | maulanarasoky/Web-Programming | /Session Form V2/SQL/database_user.sql | UTF-8 | 1,679 | 3.125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 25, 2019 at 09:18 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0da2cf4e4965db039a83adb398f858daab9296db | SQL | radtek/OracleScripts | /SQL/ТТН Петроникс и SH30.sql | WINDOWS-1251 | 2,745 | 3.671875 | 4 | [] | no_license | select * from
(
select
SUBSTR(owi.line_id, -10, 10) as line_id,
doc.doc_num "_",
fact.num_otgr "_",
fact.num_sec "",
doc.date_doc "",
gds.name "",
owi.volume "",
owi.pure_weight "",
round(fact.ves,3) "_",
fact.vzliv "_",
PCK_ADM.FNC_GET_EMPLOYEE(access_.from_emp_id, 1) "__",
PCK_ADM.FNC_GET_EMPLOYEE(access_.e... | true |
4c4a76bbe12ed86a114d17204554ba6f9876589a | SQL | AkhilLaxman/My-repository | /online_examination.sql | UTF-8 | 2,944 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 11, 2020 at 11:06 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
14794de5061b11ad71c88a19f050f37698f55980 | SQL | AluskaM/App_db_lab3 | /loop.sql | UTF-8 | 449 | 2.6875 | 3 | [] | no_license | DECLARE
var_id reviews.id%TYPE;
var_app_name reviews.app_name%TYPE := 'app_name';
var_reviews_count reviews.reviews_count%TYPE;
BEGIN
FOR i IN 1..10 LOOP
INSERT INTO reviews (
id,
app_name,
reviews_count
)
VALUES ... | true |
4077f5cefbd7025593fbb25ea58e080dae362be5 | SQL | with-sahan/jentest | /database/CreateDatabase/SP/psm/getchat.sql | UTF-8 | 1,679 | 3.8125 | 4 | [] | no_license | DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `getchat`(token varchar(255), issueid int)
BEGIN
declare spcode varchar(45);
declare username varchar(45);
declare userfirstname varchar(45);
declare userlastname varchar(45);
declare orgcode varchar(45);
declare organizationid int(11);
declare u... | true |
1d68031a8682598dca5d955b06e48823a6e257fe | SQL | yun6713/springboot | /sql/security.sql | UTF-8 | 689 | 3.5 | 4 | [] | no_license | CREATE TABLE "user" (
`u_id` varchar(255) NOT NULL,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `role` (
`r_id` varchar(255) NOT NULL,
`role` varchar(255) NULL DEFAULT NULL,
PRIMARY KEY (`r_id`)
);
CREATE TABLE `user_role` (
... | true |
68cb022e1da2c6f74f9a5fba7528690e5499704d | SQL | superfrost/telegram_segmentation_bot | /init.sql | UTF-8 | 564 | 3.296875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY NOT NULL,
username TEXT,
telegram_id INTEGER NOT NULL UNIQUE,
date TEXT NOT NULL,
role INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS images (
id INTEGER PRIMARY KEY NOT NULL,
file_name TEXT NOT NULL,
telegram_id INTEGER NOT NULL REFERENCES user... | true |
457de94833dc9e65a85aa64e90cc078e803b4d1e | SQL | tangaot/gmall | /src/ca/tangaot/gamll/dwt/dwt_user_topic/insert_init_dwt_user_topic.sql | UTF-8 | 18,495 | 3.125 | 3 | [] | no_license | -- 用户主题
USE gmall;
insert overwrite table dwt_user_topic partition (dt = '2021-06-16')
select id,
login_date_first,--以用户的创建日期作为首次登录日期
nvl(login_date_last, date_add('2021-06-16', -1)),--若有历史登录记录,则根据历史记录获取末次登录日期,否则统一指定一个日期
nvl(login_last_1d_count, 0),
nvl(login_last_1d_day_count, 0),
... | true |
16b7ec7b0498fe4d3a2817ed8ae028152f011f50 | SQL | ZsuzsaBenko/webshop-java-generalstore | /src/main/webapp/sql/store.sql | UTF-8 | 1,006 | 3.46875 | 3 | [] | no_license | drop table if exists product;
drop table if exists product_category;
drop table if exists supplier;
drop table if exists users;
create table supplier
(
id serial not null primary key,
name varchar not null,
description varchar not null
);
create table product_category
(
id serial not null primary key,... | true |
ee8e8a43915f2af4d87b93c242bf2b61d70b38d8 | SQL | smukashev/essp | /usci/db_oracle_scripts/eav_table_partitioning_new.sql | UTF-8 | 14,642 | 3.3125 | 3 | [] | no_license | declare
l_errors NUMBER;
v_table_ddl VARCHAR2(30000);
v_trigger_ddl varchar2(4000);
v_trigger_enable_ddl VARCHAR2(4000);
v_schema VARCHAR2(32) := 'CORE';
v_counter number;
v_index_ddl VARCHAR2(4000 CHAR);
type string_table IS TABLE OF VARCHAR2(4000 CHAR);
v_index_ddl_table string_table := string_tab... | true |
4f1192e1aec7556d59a6400ee1064b0e75dbf867 | SQL | Diogo2550/Administrador-de-Livros-Java | /sql-db/bookmanager.sql | UTF-8 | 3,547 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 19-Jun-2021 às 18:43
-- Versão do servidor: 10.4.18-MariaDB
-- versão do PHP: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
3bec0aedae8e3b7dfaec4ad2b724a03e3d6a2e08 | SQL | thrasher-corp/gocryptotrader | /database/migrations/20200518131133_exchange/sqlite3.sql | UTF-8 | 322 | 2.953125 | 3 | [
"MIT"
] | permissive | -- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE TABLE "exchange" (
id text not null primary key,
name text not null,
unique(name) ON CONFLICT IGNORE
);
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
DROP TABLE "exchange... | true |
0a4cfddc7e0d710d973086c70b22a8f71ea216d8 | SQL | sam030398/dvd-rental-dbt | /models/mart/dim_films.sql | UTF-8 | 556 | 3.265625 | 3 | [] | no_license | SELECT
film_id,
language_id,
category_id,
title as film_title,
release_year,
rating,
category_name,
language_name,
rental_duration,
rental_rate,
replacement_cost,
a.actors
FROM
{{ source('dvd_rental','film') }}
LEFT JOIN {{ source('dvd_rental','film_category') }} ... | true |
ba13ecb0fa9eb24bec8160566076be230ca7cde5 | SQL | Clube-do-Enrolado/BancoDeDados-FeiFlix | /Etapa2-ModeloRelacional/queries/CreateTables.sql | UTF-8 | 5,709 | 3.078125 | 3 | [] | no_license | CREATE TABLE public.usuario (
id_usuario integer NOT NULL unique,
email varchar(50) NOT NULL,
senha varchar(25) NOT NULL,
plano varchar(50) NOT NULL,
PRIMARY KEY (id_usuario),
unique (id_usuario)
);
CREATE TABLE public.perfil (
id_perfil integer NOT NULL unique,
id_usuario integer NOT NULL... | true |
4b51b41f8161ab329f4a66fba81bca273353eabe | SQL | ReapOruz/Datawherehouse | /datawherehouse.sql | UTF-8 | 6,002 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 22-11-2020 a las 02:52:56
-- Versión del servidor: 10.4.14-MariaDB
-- Versión de PHP: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
a3ec3ec511908beca82283d68eed90559f0a6ba3 | SQL | bumgardnera07/DailyKata | /SQL/Best-Selling Books (SQL for Beginners #5).sql | UTF-8 | 275 | 3.265625 | 3 | [] | no_license | /* https://www.codewars.com/kata/591127cbe8b9fb05bd00004b */
SELECT Top 5 * from books order by copies_sold DESC;
/* Test Cases in Ruby
# Run SQL
results = run_sql
# Tests
describe :books do
it "should return 5 books" do
expect(results.count).to eq 5
end
end
*/ | true |
a7194fbab36066913ede9cd5336a750397dc0d58 | SQL | radtek/Scripts | /sesospid.sql | UTF-8 | 641 | 2.9375 | 3 | [] | no_license | prompt
SELECT
s.sid db_sid
,s.serial# db_serial
,p.spid os_pid
,to_char(s.logon_time, 'YYYY/MM/DD HH24:MI:SS') db_logon_time
,nvl(s.username, 'SYS') db_user
,s.osuser os_user
,s.sql_id
,s.prev_sql_id
,s.machine os_machine
,nvl(decode(instr(s.terminal, chr(0))
,0
,s.terminal
,substr(s.terminal, 1, instr(s.terminal, chr... | true |
e30e5207db029372bf711505af3940863ebd9a7c | SQL | oromeo10/SuperUsers | /05 Team/HR.sql | UTF-8 | 3,172 | 3.640625 | 4 | [] | no_license | DROP SCHEMA IF EXISTS HumanResources;
CREATE SCHEMA HumanResources;
use HumanResources;
CREATE TABLE IF NOT EXISTS HumanResources.POSITIONS(
POSID int NOT NULL,
POS_name varchar(15) NOT NULL,
POS_type varchar(15) NOT NULL,
Hourly int,
Salary int,
Manager varchar(15) NOT NULL,
Requireme... | true |
663cdaae19f475b9a5a797db52541f0630d17d78 | SQL | clleung/tartanhacks21 | /create.sql | UTF-8 | 4,605 | 3.546875 | 4 | [] | no_license | -- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2021-03-07 04:45:43.933
-- tables
-- Table: Category
CREATE TABLE Category (
category_id serial NOT NULL,
name varchar(100) NOT NULL,
description text NOT NULL,
risk_index int NOT NULL,
CONSTRAINT Category_pk PRIMARY KEY ... | true |
f97ca2c5fd0557da02625eed2ad2a6ecb767be9d | SQL | dev0psunleashed/Sandata_SampleDemo | /Services/Data/Gen/GEN_REST_STAFF_SERVICE/src/main/resources/sql/get_staff_coordinators.sql | UTF-8 | 892 | 4.125 | 4 | [] | no_license | SELECT DISTINCT T1.ADMIN_STAFF_SK,T1.ADMIN_STAFF_ID,T1.ADMIN_STAFF_FIRST_NAME,T1.ADMIN_STAFF_LAST_NAME,
T2.ADMIN_STAFF_ROLE_XREF_SK,T2.ADMIN_STAFF_ROLE_NAME
FROM ADMIN_STAFF T1
INNER JOIN (SELECT BE_ID, ADMIN_STAFF_ID,ADMIN_STAFF_ROLE_NAME,REC_TERM_TMSTP,CURR_REC_IND,
ADMIN_STAFF_ROLE_EFF_DATE... | true |
db857087f95841ddf7e5171909cc4287c98e5b6a | SQL | Siimone/PlaneAltitudeTracker | /db.sql | UTF-8 | 566 | 3.140625 | 3 | [] | no_license | CREATE TABLE planes(
id serial PRIMARY KEY,
model varchar(255),
lastWarningId int
);
CREATE TABLE messages(
id serial PRIMARY KEY,
plane_id int references planes(id),
lat float8,
lng float8,
altitude float,
timestamp int
);
CREATE TABLE warnings(
id serial PRIMARY KEY,
plane_id int references planes(id),
... | true |
b9e9c51e8bec30d9cb5134e14218da2fe7b72211 | SQL | rvmodesto/MySQL | /Exercicios_19_08_21/Exercicio 6 - MySQL - CursoDaMinhaVida.sql | UTF-8 | 2,225 | 3.671875 | 4 | [] | no_license | create database db_cursoDaMinhaVida;
use db_cursoDaMinhaVida;
create table tb_categoria (
id bigint auto_increment,
modalidade varchar(20),
valor varchar(20),
primary key(id)
);
insert into tb_categoria(modalidade, valor) values("ead", "grátis");
insert into tb_categoria(modalidade, valor) values("presencial", "grát... | true |
c0366c02faadc9bdd71732fca4839b2a3ca96960 | SQL | benabel1/Garwan2 | /src/main/resources/data.sql | UTF-8 | 1,935 | 2.609375 | 3 | [] | no_license | insert into USER_TABLE (email, username, roles, password) VALUES('ja@garwan.sk', 'ja', 'ADMIN','1');
insert into USER_TABLE (email, username, roles, password) VALUES('ty@garwan.sk', 'ty', 'ADMIN','1');
insert into USER_TABLE (email, username, roles, password) VALUES('on@garwan.sk', 'on', 'A','1');
insert into USER_T... | true |
637bd6350a73ed53c07d0ad9feb3b700d22274ce | SQL | AndreuMad/node_complete_api | /src/features/sqlBooks/sql/getAuthorsLatestBook.sql | UTF-8 | 570 | 4.15625 | 4 | [] | no_license | SELECT
book.id AS id,
book.title AS book_title,
book.released_year AS book_released_year,
book.pages AS book_pages,
author.id AS author_id,
author.first_name AS author_first_name,
author.last_name AS author_last_name
FROM books book
INNER JOIN authors author ON author.id = book.author_id
WHERE book.released_year... | true |
fb8a7282846bf1de57d5eaa8894a51ad7726ed42 | SQL | antono124/messagapp | /database/queries.sql | UTF-8 | 604 | 3.40625 | 3 | [] | no_license | CREATE TABLE user
(
user_id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT ,
username VARCHAR(400) NOT NULL,
password VARCHAR(400) NOT NULL
);
CREATE TABLE message (
message_id bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT,
title varchar(100) DEFAULT NULL,
body text,
sender_id bigint(20) DEFAULT NULL,
cre... | true |
f58e32a49a77ca569b34dd1182f7fdb943cbe299 | SQL | hangxingliu/assignment-database-student-system | /server/sqls/book_list.sql | UTF-8 | 1,150 | 4.65625 | 5 | [
"Apache-2.0"
] | permissive | -- 筛选出属于当前页面显示范围的图书信息
WITH TBookInfos AS (
SELECT * FROM TBookInfo ORDER BY BookInfoID OFFSET @offset ROWS FETCH NEXT @size ROWS ONLY
),
-- 选出对应这个图书信息的图书
TBooks AS (
SELECT * FROM TBook WHERE BookInfoID IN (SELECT BookInfoID FROM TBookInfos)
),
-- 对这些图书按照图书信息归类(以获得每本书的数目)
TBooksGroupBy AS (
SELECT BookInfoID,... | true |
0b7207f17ace5cf0027aec3c5d197e891affa6a1 | SQL | piszewc/python-deep-learning-data-science | /T-SQL/Querying Data with Transact-SQL/Labs/Lab6 - Using Subqueries and APPLY/2 Retrieve Customer Information.sql | UTF-8 | 568 | 3.796875 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- Retrieve customer information for all sales orders
SELECT soh.SalesOrderID, soh.CustomerID, ci.FirstName, ci.LastName, soh.TotalDue
FROM SalesLT.SalesOrderHeader as soh
CROSS APPLY dbo.ufnGetCustomerInformation(soh.CustomerID) AS ci
ORDER BY soh.CustomerID
-- Retrieve customer information for all sales orders
S... | true |
511ac9876d3e8e726ed5f0ec1cf0c5d67b0336b3 | SQL | suhuaguo/datax-admin | /docs/sql/datax_admin.sql | UTF-8 | 6,682 | 3.4375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : local_mysql5.7.26
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : datax_admin
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 2... | true |
1de4f8c760d71d69aea6f0f9831af8682e5e2510 | SQL | kelele77/ZuriLoginSystem | /Testfile/loginsystem.sql | UTF-8 | 2,459 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 26, 2021 at 08:22 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
6b3f324b28873eea5c11560487d9c1f768c288ef | SQL | lwlflz/workspace | /sql/RuntimeStruct.sql | UTF-8 | 132,462 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | /*
SQLyog Professional v12.09 (64 bit)
MySQL - 5.7.21 : Database - ddjs-dev
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_C... | true |
bbee5c5b7e3ae73502774f1e584f489b6a286e4d | SQL | shijianzsh/fenggubao | /update/v1.0/upgraded/V1.4/存储过程.-.0225.谷聚金代理专区.事件-激活合伙人.sql | UTF-8 | 832 | 3.125 | 3 | [] | no_license | -- -------------------------------
-- 谷聚金代理专区 - 事件 - 激活合伙人身份
-- -------------------------------
DROP PROCEDURE IF EXISTS `Gjj_Event_activated`;
DELIMITER ;;
CREATE PROCEDURE `Gjj_Event_activated`(IN userId INT(11), IN role TINYINT(1), OUT error INT(11))
BEGIN
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET error = 1; ... | true |
a3c69f02edf9312e34ce4ba4ec961043ae54387c | SQL | wuyuchuan617/Chair-Meseum | /productdatabase/database_sql/my_test (1).sql | UTF-8 | 91,948 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2020-09-10 04:39:22
-- 伺服器版本: 10.4.13-MariaDB
-- PHP 版本: 7.3.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
a6ffc7b1a84235916ecbd93ede7c77bd2ce2ab28 | SQL | ddtBeppu/SQL_drill | /section1-8/q3.sql | UTF-8 | 1,101 | 3.921875 | 4 | [] | no_license | /* 問3 */
/*
貸し出し記録テーブル(rental)から未返却のもので貸出日が古いものを先頭から5件取り出してみましょう。
取得列はuser_id、isbn、rental_date列とします。
*/
/** 解答 **/
mysql> SELECT -- 選択
-> user_id, -- ユーザID
-> isbn, -- ISBN識別子
-> rental_date -- 貸出日
-> FROM -- テーブルを指定
-> rental -- rentalテーブルを指定
-> WHERE -- 条件で絞り込み
-> returned = 0 -- 未返却... | true |
ce06236562e69834dd7dd3c6a0e8f36615b6225c | SQL | khaleds961/School_Lms_System | /BackEnd/LMSS.sql | UTF-8 | 9,607 | 3.078125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jun 16, 2021 at 08:51 AM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
29c325108b02ab863554129288ed1249358d3f30 | SQL | aksharareddyg3/EMRS_Database | /EMRS_Users_Authentication.sql | UTF-8 | 2,263 | 2.828125 | 3 | [] | no_license | -- creating a admin user
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin';
GRANT SELECT ON dental_clinic.* TO 'admin'@'localhost';
GRANT INSERT ON dental_clinic.* TO 'admin'@'localhost';
GRANT UPDATE ON dental_clinic.* TO 'admin'@'localhost';
GRANT DELETE ON dental_clinic.* TO 'admin'@'localhost';
-- creating a ... | true |
4e98366b0abf2dfa2852194622df8cd6e13a19c4 | SQL | marciojrtorres/bd-2016 | /dados/municipios4.sql | UTF-8 | 942 | 3.359375 | 3 | [] | no_license | DROP TABLE IF EXISTS idhm_temp;
CREATE TABLE idhm_temp (
ano INTEGER,
uf INTEGER,
codigo INTEGER,
municipio VARCHAR(100),
idhm DECIMAL,
idhm_e DECIMAL,
idhm_l DECIMAL,
idhm_r DECIMAL
);
COPY idhm_temp
FROM '/home/torres/github/bd-2016/dados/municipios4.csv'
WITH DELIMITER '... | true |
1086bf9f43045ac2dbe254d52e3a52dcc8d81742 | SQL | dohack-io/PartyPlay | /API/lobbys.sql | UTF-8 | 1,602 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Erstellungszeit: 24. Mrz 2019 um 10:50
-- Server-Version: 10.2.22-MariaDB-log-cll-lve
-- PHP-Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!... | true |
61acc7147a831dcd69090507bfaa6947e1a248f4 | SQL | meou2731999/assignment2-web | /web_ass2.sql | UTF-8 | 8,345 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th12 28, 2020 lúc 02:57 PM
-- Phiên bản máy phục vụ: 10.1.38-MariaDB
-- Phiên bản PHP: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
61d54197ef16c5e63775bb2be24e225c12a25069 | SQL | nidhirpatil/Student-Registration-System | /dbms.sql | UTF-8 | 8,025 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 14, 2018 at 05:42 PM
-- Server version: 5.7.24-0ubuntu0.18.04.1
-- PHP Version: 7.2.10-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
3d1bcbe462bf74630ab15b6fec85a9f7e8db1901 | SQL | vagnerclementino/dissertacao | /90-dissertacao-data/Scripts/ddl/views/mapeamento_its_vw_papel_suportados_artigos.sql | UTF-8 | 329 | 2.75 | 3 | [
"MIT"
] | permissive | create or replace view mapeamento_its.vw_papel_suportados_artigos as
(select vw.identificador_artigo,
vw.titulo_artigo,
vw.contribuicao_artigo,
vw.resumo_artigo,
trim(unnest(string_to_array(vw.papel_suportado_ferramenta, ','))) as papel_suportado_ferramenta
from mapeamento_its.vw_artigos_mapeamen... | true |
c9e66a9c4c4aa21302f09dfd02c77bbb90e6ae16 | SQL | gabrielcantos/BD2 | /exercicios-3/24.sql | UTF-8 | 165 | 3.375 | 3 | [] | no_license | select staff.staff_id, staff.first_name, staff.last_name, count(payment_id)
from staff
inner join payment on staff.staff_id = payment.staff_id
group by first_name;
| true |
b1bfac629af36522b80498203544d067c798a592 | SQL | dalismo/api_call_of_duty_etl | /QuickDBD-schema_export.sql | UTF-8 | 1,931 | 3.21875 | 3 | [] | no_license | CREATE TABLE "game" (
"game_id" int NOT NULL,
"game_name" VARCHAR NOT NULL,
"release_date" date NOT NULL,
"genre" VARCHAR NOT NULL,
CONSTRAINT "pk_game" PRIMARY KEY (
"game_id"
)
);
CREATE TABLE "platform" (
"platform_id" VARCHAR NOT NULL,
CONSTRAINT "pk_platform" PR... | true |
dc46b1800f039c86caa9d32f3961d9efa05eb45d | SQL | hinriqui/senai-sprint-1-bd | /exercicios/1.1-exercicio-pessoas/1.1-exercicio-pessoas-DQL.sql | UTF-8 | 267 | 3.28125 | 3 | [] | no_license | USE UNIDAS
SELECT numeroTelefone, nomePessoa, descricao, enderecoEmail FROM Pessoa
LEFT JOIN Telefone
ON Telefone.idPessoa = Pessoa.idPessoa
LEFT JOIN CNH
ON CNH.idPessoa = Pessoa.idPessoa
LEFT JOIN Email
ON Email.idPessoa = Pessoa.idPessoa
ORDER BY nomePessoa DESC
| true |
0efb8e31683589f397262aa634adcdfefd8e9eb7 | SQL | SherenaT/sql-basics | /artist.sql | UTF-8 | 765 | 3.90625 | 4 | [] | no_license | -- Add 3 new artists to the artist table. (It already exists.)
-- Step 5: employee table
INSERT INTO artist(name)
VALUES ('Taylor Swift');
INSERT INTO artist(name)
VALUES ('Lifehouse');
INSERT INTO artist(name)
VALUES ('10cm');
-- Select 10 artists in reverse alphabetical order.
SELECT artist_id, name FROM artist
OR... | true |
4cb234b510180472978da28c91d2de6445c66a52 | SQL | matt-kubica/DatabasesCourse | /lab5/task4.sql | UTF-8 | 585 | 3.484375 | 3 | [] | no_license | # 1.
SELECT idczekoladki, COUNT(idpudelka) as w_ilu_pudelkach FROM zawartosc
GROUP BY idczekoladki
ORDER BY w_ilu_pudelkach DESC
LIMIT ;
# 2.
SELECT z.idpudelka, SUM(z.sztuk) FROM zawartosc z
WHERE z.idczekoladki IN (SELECT cz.idczekoladki FROM czekoladki cz WHERE cz.orzechy IS NULL)
GROUP BY z.idpudelka
ORDER BY SUM... | true |
4c0b28fdf487362efbd5ac3b7184e147ff7fe402 | SQL | kwidz/VeloCampus | /BaseDeDonnee/velocampusold.sql | UTF-8 | 11,136 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2
-- http://www.phpmyadmin.net
--
-- Client: database:3306
-- Généré le: Dim 25 Mai 2014 à 16:32
-- Version du serveur: 1.0.9
-- Version de PHP: 5.4.4-14+deb7u9
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
d99403a7b117d5750f53f92f638501c91d20ff7b | SQL | jansolar/Oracle-Performance-Tuning | /bh.sql | UTF-8 | 282 | 3.28125 | 3 | [] | no_license | SELECT owner, object_name, object_type,
-- obj,
count(1)
FROM x$bh, dba_objects o
WHERE x$bh.obj = O.object_id
and o.owner not in ('SYS','SYSTEM')
and status != 'free'
GROUP BY o.owner, object_name, object_type
-- , obj
order by count(1) DESC;
| true |
63744c68f2bcec123f9814213b3a81ad80d50d4c | SQL | ehan831/coding_study | /db_study/190510.sql | UTF-8 | 13,154 | 3.625 | 4 | [] | no_license | -- 유저 생성 및 권한 부여
CREATE USER day190510 IDENTIFIED BY 1234;
GRANT CONNECT, RESOURCE TO day190510;
-- 테이블 생성
create table gogek
(
id varchar2(8)
constraint gogek_pk primary key,
name varchar2(10) not null,
tel varchar2(13)
)
/
create table sangpum
(
No varchar(6)
constraint sangpum_pk primary key,
title varcha... | true |
684188840446ab0e3a6588353637a6a4dbc730fa | SQL | PembleC/Java-Review | /InteliJ Projects/LexCode/out/production/LexCode/SQL - Assignment 13.sql | UTF-8 | 166 | 3.1875 | 3 | [] | no_license | /*
SQL - Assignment 13
Carson Pemble
11/10/20
*/
SELECT Job, AVG(Sal) AS "Average Salary"
FROM Emp
WHERE Job IN ('MANAGER', 'ANALYST')
GROUP BY Job HAVING AVG(Sal) > 1500;
| true |
c21cd2feba10aede4bcbf0da13b8d11bf40731e6 | SQL | hctr666/sigadm | /bd/gestor(1).sql | UTF-8 | 11,394 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 27-11-2014 a las 17:02:24
-- Versión del servidor: 5.5.36-cll-lve
-- Versión de PHP: 5.4.23
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
4a62b894babdc3d61742c1d4911c2a304c3bf7de | SQL | ethan-hardy/MTGSimulator | /databaseCreate.sql | UTF-8 | 515 | 3.328125 | 3 | [] | no_license | CREATE DATABASE mtgDB;
CREATE USER 'ethan'@'localhost' IDENTIFIED BY 'ethan4526';
USE mtgDB;
GRANT ALL PRIVILEGES ON mtgDB.* TO 'ethan'@'localhost' WITH GRANT OPTION;
CREATE TABLE userTable
(
userID INT UNSIGNED NOT NULL auto_increment primary key,
username VARCHAR(20),
password VARCHAR(128)
);
CREATE TABLE deckT... | true |
c11d93174af361f193ee25694d1d85db8ac6e5e3 | SQL | AuroraSNS/aurora-back | /sql/ddl.sql | UTF-8 | 3,988 | 3.8125 | 4 | [] | no_license | create sequence hibernate_sequence start with 1 increment by 1;
create table comment
(
comment_id bigint not null AUTO_INCREMENT,
content TEXT not null,
post_id bigint,
writer bigint,
primary key (comment_id)
);
create table friend
(
user_id bigint not null,
friend_id bigint not null,
... | true |
fd2d319e1f0d49c490acf97b7ecaca70f0bb0c0c | SQL | trisumanzaya/tesdumbwaybatch21 | /schooldata.sql | UTF-8 | 3,250 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2021 at 03:44 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
19e0f1dc2047f4d7150803923476f943116c6c93 | SQL | Eperty123/Private-Movie-Collection | /Data/sql/privatemoviecollection_mysql.sql | UTF-8 | 2,176 | 3.484375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : Local MySQL
Source Server Type : MySQL
Source Server Version : 100417
Source Host : localhost:3306
Source Schema : privatemoviecollection
Target Server Type : MySQL
Target Server Version : 100417
File Encoding : 65001
... | true |
2d58d9f62aee201c69d8c433612297a1076af810 | SQL | pscoro/paubot | /util/schemas.sql | UTF-8 | 786 | 2.9375 | 3 | [] | no_license | CREATE DATABASE customer_193684_paubotmain;
CREATE TABLE users (
userId VARCHAR(100) NOT NULL PRIMARY KEY,
energy INT NOT NULL,
collectedDaily INT NOT NULL,
collectedWeekly INT NOT NULL
);
CREATE TABLE worlds (
guildId VARCHAR(100) NOT NULL PRIMARY KEY,
worldName VARCHAR(100) NOT NULL,
wor... | true |
723fb90044140ea056778fa94e95b84a9b17a6eb | SQL | O10/SoaDziala | /fantasy_create.sql | UTF-8 | 5,350 | 3.5 | 4 | [] | no_license | -- DATABASE SCHEMA ---
create table category_group (
category_group_id serial primary key,
category_group_name varchar(20) not null
);
create table category (
category_id serial primary key,
category_group_id integer references category_group (category_group_id),
category_name varchar(20) not null,
size_propert... | true |
d7da0579c2a0b65a5b080282fd1271fad35a6675 | SQL | dunyuling/mysql | /sql/master_slave.sql | UTF-8 | 829 | 2.546875 | 3 | [] | no_license | #master:
#===开放所有ip 为repl
-- CREATE USER 'repl'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
-- revoke all on *.* from 'repl'@'%';
-- GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'repl'@'%';
-- CREATE USER 'repl'@'%' IDENTIFIED BY '123456';
CREATE USER 'repl'@'%' IDENTIFIED WITH mysql_native_passwo... | true |
e692b742253e6346f33065598c8b83da1b92292f | SQL | Roy7017/Smart-Control-Rest | /BD/bd.sql | UTF-8 | 2,203 | 3.71875 | 4 | [] | no_license | DROP DATABASE IF EXISTS controle;
CREATE DATABASE IF NOT EXISTS controle;
USE controle;
CREATE TABLE IF NOT EXISTS controlleur (
id INTEGER NOT NULL AUTO_INCREMENT,
matricule VARCHAR(40) NOT NULL,
info_personne TEXT,
champs_systeme TEXT,
PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS modele (
i... | true |
f17ae0e0ee7b87b7e028e1350a7b7df6f399463d | SQL | vinguyendev/aeluxtury-shop | /data/db/modules.sql | UTF-8 | 2,878 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Máy chủ: localhost:3306
-- Thời gian đã tạo: Th10 12, 2019 lúc 08:45 AM
-- Phiên bản máy phục vụ: 5.5.56-cll-lve
-- Phiên bản PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
0cfa93abdc6501d25977ab628c779db1cbfa4b0d | SQL | davemlz/Master_of_DataScience | /Data-Models/Bases_de_Datos/Practica_Final/practicaFinal.sql | UTF-8 | 3,304 | 4.375 | 4 | [] | no_license | -- PRACTICA FINAL.
-- MASTER EN DATA SCIENCE
-- DAVID MONTERO LOAIZA
-- 1. Crea una nueva tabla para almacenar las temporadas de las series.
-- La primary key ha de ser el par de campos “idSerie, numTemporada”.
-- La descripción de la tabla es la siguiente: (2 ptos)
CREATE TABLE TEMPORADAS(
idserie INT,
numT... | true |
5320453ad7386c06abb4e52571663d8ddbd22d87 | SQL | gloriapadilla/Proyecto-GEM-Farma | /GEMFARMA/simplePHPMVC-nw202001/docs/Estructura_Productos.sql | UTF-8 | 1,379 | 2.875 | 3 | [] | no_license | * codprd bigint(18) AI
dscprd varchar(70) // Descripcion comercial
sdscprd varchar(255) //descripción corta
ldscprd text // descripción larga
skuprd varchar(128) UI Codigo interno empresa
bcdprd varchar(128) UI codigo de barra
stkprd int stock
typprd char(3) tipo de producto | RTL, SRV, ISK (Retail, Servicio, Infinite ... | true |
2f1f9724112d11b8975c13c61e597ce7579bf5e2 | SQL | mbougie/gibbs | /projects/lem/projects/main/sql/v3/v3_2/qaqc/counts_between_levels.sql | UTF-8 | 1,092 | 3.296875 | 3 | [] | no_license |
---------------------------
----tract_final
----count:3108
----parent(county_final):3108
----difference from parent:0
---------------------------
----unique county geoids
SELECT
child.county,
parent.geoid
FROM
(SELECT
county
FROM
v3_2.tract_final
group by county) as child
INNER JOIN
v3_2.county_final as parent... | true |
d88acf67e82c66c3de23a6123391f6e77ecbecee | SQL | erkansezgin/SQLScripts | /Code Samples/Remove Time from DATETIME.sql | UTF-8 | 195 | 2.703125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license |
--!!! MOST EFFICIENT
print DATEADD(DAY, DATEDIFF(DAY, 0, getdate()), 0)
-- Less Efficient
print CAST(FLOOR(CAST(getdate() AS FLOAT)) AS DATETIME)
print CONVERT(VARCHAR(10), getdate(), 101)
| true |
16f2b96b620798570abbbfd755fc9e6e156c55c8 | SQL | elitej/shops-catalog | /src/main/resources/initDB.sql | UTF-8 | 961 | 4.03125 | 4 | [] | no_license | DROP TABLE IF EXISTS shops CASCADE;
DROP TABLE IF EXISTS producers CASCADE ;
DROP TABLE IF EXISTS products CASCADE ;
DROP TABLE IF EXISTS shops_products CASCADE ;
CREATE TABLE shops
(
shop_id INTEGER PRIMARY KEY,
shop_name VARCHAR(255) NOT NULL,
shop_city VARCHAR(255) NOT NULL,
shop_street VARCHAR(... | true |
5e77b39058638c26e5926dc5100aa89cb3da3236 | SQL | UrielPE/workspace-JSP-and-Servlets-Java-EE | /BD-SISTEMAS/workspace_ventas.sql | UTF-8 | 7,112 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 12-09-2019 a las 19:10:02
-- Versión del servidor: 10.3.16-MariaDB
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00"... | true |
33a02d1d1acd5f979ac6596ee8354b393e5f373e | SQL | Emily97/SecondYear | /Software Project/LoginRegistration/sql/database.sql | UTF-8 | 866 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Feb 02, 2017 at 11:19 PM
-- Server version: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `john`
--
-- -------------------------------... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.